This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Type information incorrect when @cached methods are passed as parameters #16606
Labels
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Minor
Blocks non-critical functionality, workarounds exist.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
If a method that is wrapped in
@cached
is passed into another function, e.g.run_in_background
then the type information is incorrect; the current mypy plugin only updates the type information when it is called as a method, not when it is accessed as an attribute.E.g. from #16590:
The method is not getting treated as bound (and there might be other issues too).
The text was updated successfully, but these errors were encountered: