Skip to content

Commit a068037

Browse files
committed
Another little optimization
1 parent 106c8a6 commit a068037

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mypy/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,6 +4570,12 @@ def process_stale_scc_implementation(
45704570
unfinished_modules = set(stale)
45714571
for id in stale:
45724572
checker = graph[id].type_checker()
4573+
# Optimization: if this is a 3rd party library, or we ignore errors
4574+
# otherwise in this module, skip the implementations altogether.
4575+
if checker.can_skip_diagnostics and not checker.options.preserve_asts:
4576+
unfinished_modules.discard(id)
4577+
graph[id].finish_passes()
4578+
continue
45734579
# We need to reset deferral count after possibly deferring any methods that
45744580
# are considered part of the top-level (because they define/infer variables).
45754581
checker.pass_num = 0

0 commit comments

Comments
 (0)