Skip to content

Never skip modules/packages given with -m/-p #2781

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

Closed
wants to merge 1 commit into from
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
4 changes: 4 additions & 0 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ def __init__(self,
# - skip -> don't analyze, make the type Any
follow_imports = self.options.follow_imports
if (follow_imports != 'normal'
and caller_state != None # Honor top-level modules
and path.endswith('.py') # Stubs are always normal
and id != 'builtins' # Builtins is always normal
and not (caller_state and
Expand Down Expand Up @@ -1519,6 +1520,9 @@ def write_cache(self) -> None:
def dispatch(sources: List[BuildSource], manager: BuildManager) -> None:
manager.log("Mypy version %s" % __version__)
graph = load_graph(sources, manager)
if not graph:
print("Nothing to do?!")
return
manager.log("Loaded graph with %d nodes" % len(graph))
if manager.options.dump_graph:
dump_graph(graph)
Expand Down