Skip to content

Commit

Permalink
Add binary files to stubgen blacklisted path
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Jan 14, 2023
1 parent 28e5436 commit a2ae423
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mypy/stubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,9 @@ def remove_blacklisted_modules(modules: list[StubSource]) -> list[StubSource]:


def is_blacklisted_path(path: str) -> bool:
return any(substr in (normalize_path_separators(path) + "\n") for substr in BLACKLIST)
return path.endswith((".dll", ".so")) or any(
substr in (normalize_path_separators(path) + "\n") for substr in BLACKLIST
)


def normalize_path_separators(path: str) -> str:
Expand Down

0 comments on commit a2ae423

Please sign in to comment.