You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think mypy should error out on the foo() call since it's not possible to resolve both Callables to a common ParamSpec P.
When I put the same code into VSCode, pylance reports the following error:
Argument of type "(x: str) -> None" cannot be assigned to parameter "cb2" of type "(**P@foo) -> None" in function "foo"
Type "(x: str) -> None" is not assignable to type "(x: int) -> None"
Parameter 1: type "int" is incompatible with type "str"
"int" is not assignable to "str"
Pylance[reportArgumentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportArgumentType)
Actual Behavior
mypy does not report any issues:
Success: no issues found in 1 source file
Your Environment
See the playground link above, but when I run into this locally, I have:
Mypy version used: mypy 1.11.2 (compiled: yes)
Mypy command-line flags: --strict
Mypy configuration options from mypy.ini (and other config files): None
Python version used: Python 3.12.2
The text was updated successfully, but these errors were encountered:
Bug Report
Hey everyone, thanks for all the great work on mypy!
I ran into an issue where mypy does not warn if 2 ParamSpecs need to align but they don't. Hard to describe, so here's an example:
To Reproduce
Playground link: https://mypy-play.net/?mypy=latest&python=3.12&flags=strict&gist=f2fac01dde7a953c5dec5117428350f6
Expected Behavior
I think mypy should error out on the
foo()
call since it's not possible to resolve both Callables to a common ParamSpecP
.When I put the same code into VSCode, pylance reports the following error:
Actual Behavior
mypy does not report any issues:
Your Environment
See the playground link above, but when I run into this locally, I have:
mypy 1.11.2 (compiled: yes)
--strict
mypy.ini
(and other config files):None
Python 3.12.2
The text was updated successfully, but these errors were encountered: