Skip to content

Commit 5f8fd6a

Browse files
committed
Traverse module ancestors when traversing reachable graph nodes during dmypy update
1 parent a4e79ea commit 5f8fd6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/dmypy_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,8 @@ def find_reachable_changed_modules(
756756
changed.append((nxt.module, nxt.path))
757757
elif nxt.module in graph:
758758
state = graph[nxt.module]
759-
for dep in state.dependencies:
759+
ancestors = state.ancestors or []
760+
for dep in state.dependencies + ancestors:
760761
if dep not in seen:
761762
seen.add(dep)
762763
worklist.append(BuildSource(graph[dep].path, graph[dep].id, followed=True))

0 commit comments

Comments
 (0)