Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions mypy/stubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,15 @@ def get_qualified_name(o: Expression) -> str:


def remove_blacklisted_modules(modules: List[StubSource]) -> List[StubSource]:
return [module for module in modules
if module.path is None or not is_blacklisted_path(module.path)]
return_modules = []
for module in modules:
if module.path is not None and is_blacklisted_path(module.path):
print(f"Skipping Module Path '{module.path}'")
elif module.path is None:
pass
else:
return_modules.append(module)
return return_modules


def is_blacklisted_path(path: str) -> bool:
Expand Down