Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Labels
bugmypy got something wrongmypy got something wrongtopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate
Description
Bug Report
Even though it fails at runtime, mypy doesn't complain if I mutate ParamSpec.kwargs.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=f5cea6637a9ea13c48b8ba75aa8d73dd
If I run this same code in an interpreter, I get
Traceback (mostrecentcalllast): File"/tmp/repro.py", line16, in<module>print(bar(foo)) File"/tmp/repro.py", line13, inbarreturnf(*args, **kwargs) TypeError: foo() gotanunexpectedkeywordargument'ka'Expected Behavior
I would expect this to trigger an error on line 12.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate