Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 7f70c2a

Browse files
try to force a mypy error
1 parent c9098aa commit 7f70c2a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/components.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def component_filtered_report(
3333
"""
3434
print(report)
3535
print(components)
36-
36+
37+
# This will fail mypy with "Item "None" of "Optional[Report]" has no attribute "filter""
38+
# Because we're not checking if report is None before accessing filter()
39+
report: Optional[Report] = report
40+
filtered_report = report.filter(flags=flags, paths=paths)
41+
3742
flags, paths = [], []
3843
for component in components:
3944
flags.extend(component.get_matching_flags(report.flags.keys()))

0 commit comments

Comments
 (0)