-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pyright not recognizing metaclass keyword arguments #2436
Comments
Yes, you should use |
Looks like this is a known missing feature in mypy. This issue was filed almost five years ago, and it still hasn't been addressed. I think that metaclasses that take typed keyword parameters are pretty rare, so it's understandable that such a feature would be low priority for a type checker. For now I'm going to close this request, but we can will reconsider in the future if there is sufficient interest (additional requests or upvotes on this issue). |
I think this should be added, python uses them in the stdlib1 and i commonly use them in my code as they can remove boilerplate. I dont think we should be pinning not adding features due to mypy not supporting them, mypy is notorious for being slow at adding new features and fixing bugs. |
This is included in pyright 1.1.201, which I just published. It will also be included in the next release of pylance. |
Describe the bug
Pyright doesn't recognize the keyword arguments of a metaclass when passing them in the class definition, though it does for classes with
__init_subclass__
defined.Screenshots or Code
VS Code extension or command-line
Are you running pyright as a VS Code extension or a command-line tool?
Command line (version 1.1.178)
The text was updated successfully, but these errors were encountered: