Skip to content

Commit

Permalink
Filter out hidden targets
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonym committed Dec 19, 2023
1 parent cbf1ed2 commit 0bb21c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mypy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,10 @@ def targets(self) -> set[str]:
# TODO: Make sure that either target is always defined or that not being defined
# is okay for fine-grained incremental checking.
return {
info.target for errs in self.error_info_map.values() for info in errs if info.target
info.target
for errs in self.error_info_map.values()
for info in errs
if info.target and not info.hidden
}

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

0 comments on commit 0bb21c6

Please sign in to comment.