Skip to content

Commit 0bb21c6

Browse files
committed
Filter out hidden targets
1 parent cbf1ed2 commit 0bb21c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypy/errors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,10 @@ def targets(self) -> set[str]:
940940
# TODO: Make sure that either target is always defined or that not being defined
941941
# is okay for fine-grained incremental checking.
942942
return {
943-
info.target for errs in self.error_info_map.values() for info in errs if info.target
943+
info.target
944+
for errs in self.error_info_map.values()
945+
for info in errs
946+
if info.target and not info.hidden
944947
}
945948

946949
def render_messages(self, errors: list[ErrorInfo]) -> list[ErrorTuple]:

0 commit comments

Comments
 (0)