Skip to content

Commit 4e83799

Browse files
committed
Fix dmypy namespace package cache traversal
1 parent 08b106e commit 4e83799

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎mypy/dmypy_server.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,8 @@ def find_reachable_changed_modules(
769769
state = graph[nxt.module]
770770
ancestors = state.ancestors or []
771771
for dep in state.dependencies + ancestors:
772-
if dep not in seen:
772+
# Namespace package ancestors don't always have a graph node.
773+
if dep not in seen and dep in graph:
773774
seen.add(dep)
774775
worklist.append(BuildSource(graph[dep].path, graph[dep].id, followed=True))
775776
return changed, new_files

0 commit comments

Comments
 (0)