Skip to content

report: use list comprehension to check for interpreters#608

Open
bdrung wants to merge 1 commit into
canonical:mainfrom
bdrung:interpreter-list-comprehension
Open

report: use list comprehension to check for interpreters#608
bdrung wants to merge 1 commit into
canonical:mainfrom
bdrung:interpreter-list-comprehension

Conversation

@bdrung

@bdrung bdrung commented Apr 28, 2026

Copy link
Copy Markdown
Member

mypy will complain if ProblemReport will get type hints:

error: Argument 1 to "filter" has incompatible type "Callable[[Any], bool]"; expected "Callable[[str], TypeGuard[object]]"  [arg-type]
error: Value of type variable "AnyStr" of "fnmatch" cannot be "object"  [type-var]

Use a list comprehension instead to make mypy happy and the code more readable.

@codecov

codecov Bot commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.46%. Comparing base (d9d3c9f) to head (61a8641).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #608      +/-   ##
==========================================
- Coverage   84.47%   84.46%   -0.01%     
==========================================
  Files         106      106              
  Lines       21053    21053              
  Branches     3223     3223              
==========================================
- Hits        17784    17783       -1     
- Misses       2792     2793       +1     
  Partials      477      477              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mypy will complain if `ProblemReport` will get type hints:

```
error: Argument 1 to "filter" has incompatible type "Callable[[Any], bool]"; expected "Callable[[str], TypeGuard[object]]"  [arg-type]
error: Value of type variable "AnyStr" of "fnmatch" cannot be "object"  [type-var]
```

Use a list comprehension instead to make mypy happy and the code more
readable.
@bdrung
bdrung force-pushed the interpreter-list-comprehension branch from 425500b to 61a8641 Compare July 2, 2026 21:47
@bdrung
bdrung requested a review from Hyask July 3, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant