Skip to content

Commit 162419a

Browse files
author
Guido van Rossum
committed
Move the fix_cross_refs() loop before the semantic_analysis() loop.
This is a fix inspired by testing on some real-world codebases; I don't know how to reproduce the issues I saw before.
1 parent 0ef41f3 commit 162419a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,10 +1878,10 @@ def process_stale_scc(graph: Graph, scc: List[str], manager: BuildManager) -> No
18781878
# If the former, parse_file() is a no-op.
18791879
graph[id].parse_file()
18801880
graph[id].fix_suppressed_dependencies(graph)
1881-
for id in stale:
1882-
graph[id].semantic_analysis()
18831881
for id in fresh:
18841882
graph[id].fix_cross_refs()
1883+
for id in stale:
1884+
graph[id].semantic_analysis()
18851885
for id in stale:
18861886
graph[id].semantic_analysis_pass_three()
18871887
for id in fresh:

0 commit comments

Comments
 (0)