Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stubgen : Adding a print message on ignoring module <path> #11476

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
adding print message for blacklisted modules
  • Loading branch information
noob8boi committed Nov 6, 2021
commit 58101a50f1fe36501856ce132e18f58b82f396e4
10 changes: 7 additions & 3 deletions mypy/stubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,12 1271,16 @@ 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)]
module = [module for module in modules]
if is_blacklisted_path(module.path):
print(f"Ignoring Module Path '{module.path}'")

elif module.path is None or not is_blacklisted_path(module.path):
return module



def is_blacklisted_path(path: str) -> bool:
print(f"Ignoring module {path}")
return any(substr in (normalize_path_separators(path) '\n')
for substr in BLACKLIST)

Expand Down