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
This bug only occurs on the second run when using incremental mode. When using nested ParamSpecs, the outer ParamSpec (M below) is erroneously equal to the inner ParamSpec (P below).
I expect the signature of BADerived to include b_param_1, like this:
mypy_nested_paramspec.py:49: note: Revealed type is "def (b_param_1: builtins.str, a_param_1: builtins.float) -> mypy_nested_paramspec.B[[a_param_1: builtins.float], ADerived]"
I also expect that calls to BADerived with the correct parameter count and types do not raise any errors.
Actual Behavior
mypy_nested_paramspec.py:49: note: Revealed type is "def (a_param_1: builtins.float) -> mypy_nested_paramspec.B[[a_param_1: builtins.float], mypy_nested_paramspec.ADerived]"
mypy_nested_paramspec.py:52: error: Too many arguments [call-arg]
mypy_nested_paramspec.py:53: error: Argument 1 has incompatible type "str"; expected "float" [arg-type]
Your Environment
Mypy version used: mypy 0.991 (compiled: yes)
Python version used: 3.10.6
The text was updated successfully, but these errors were encountered:
Bug Report
This bug only occurs on the second run when using incremental mode. When using nested
ParamSpec
s, the outerParamSpec
(M
below) is erroneously equal to the innerParamSpec
(P
below).Notably, pyright handles this correctly.
To Reproduce
Expected Behavior
I expect the signature of
BADerived
to includeb_param_1
, like this:I also expect that calls to
BADerived
with the correct parameter count and types do not raise any errors.Actual Behavior
Your Environment
The text was updated successfully, but these errors were encountered: