-
-
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
Cannot declare the type of a type variable #7233
Comments
What would be the point of adding |
I didn't realize it was already disallowed by mypy, that's good to know. I simply annotated the TypeVars as If the new behavior is actually correct and desired then feel free to close this issue. |
OK, I think the old behavior of accepting final was probably just an accident, but leaving to @msullivan or @ilevkivskyi (authors of the |
Yes, type variables are always implicitly final. The error message is poor, but we already have #1573 to track bad error messages for invalid type variables. |
After updating a project to version
0.720
I'm encountering a new error triggered by applyingFinal
(fromtyping_extensions
) to aTypeVar
. A reproduction is below:output:
Yes (
mypy-0.730+dev.b405e05e220935dca6aa895045924ee68b435091
)The text was updated successfully, but these errors were encountered: