-
-
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
Concatenate
false positive (no problem with pyright
)
#14168
Comments
On master mypy emits a better error now:
I think this should be allowed, function with named argument should be fine where a function with positional-only argument is expected (unless I am missing something). And this error also hints a workaround: making |
OK, after reading the code, it looks like there is some unsafety here. Consider for example def foo(self, a: int, int, *args: Any, **kwargs: Any) and |
@supersergiy is the project you were running into this on open source? |
@hauntsaninja yup it is, why? |
Where can I find it — is it https://github.com/ZettaAI/zetta_utils? I'd like to add it to https://github.com/hauntsaninja/mypy_primer . This will let us detect regressions or measure future improvements on your code. I think we could use more coverage of real world ParamSpec usage. |
Yup, that's the one. Happy if it helps |
It has already helped :-) #15953 (comment) |
Bug Report
Concatenate
causes a false positive in the following example:To Reproduce
Playground Link
Expected Behavior
No type error expected, which works with
pyright
(pyright playground)Actual Behavior
Your Environment
The text was updated successfully, but these errors were encountered: