-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in 1.2.0: callback protocol with Callable and Concatenate #15065
Comments
Possibly related to #15037 in which the same error arises without the callback protocol part, like so: def foo(value: int) -> Callable[[Callable[Concatenate[str, P], int]], Callable[P, int]]:
def bar(fct: Callable[Concatenate[str, P], int]) -> Callable[P, int]:
raise NotImplementedError
return bar
|
Thank you @AlexWaygood for your analysis! In that case it seems to confirm that it is a duplicate of #15037. But at least it gives @A5rocks an other case (the example from the description of the PR uses a |
Looks like the fix was reverted: #15272 (comment). Can we please re-open this issue so that we can keep track of the problem? Thanks. |
Fortunately, the PR it was reverted for fixes this too. Namely, #15837 |
Bug Report
The code below passed with mypy
1.1.1
but not in1.2.0
To Reproduce
I haven't been able to strip down any further, it seems that it has something to do with both
Callable
andConcatenate
.Expected Behavior
No error (as in mypy 1.1.1).
Actual Behavior
The following error is displayed:
Note that I have tried to change the
Decorator
definition to makefct
parameter positional-only:Which resulted in the error message being even more confusing:
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: