-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Error in type comment points to wrong line #7472
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
Comments
This is an instance of #3871. I tested on 3.8 and with the better source information, it was able to correctly report the error on the function declaration line. Perhaps we should document this? |
It probably makes sense to add a short item in |
Even in 3.8 the error points to the line |
I'm changing the priority to "low", since type comments are rarely used in modern Python (parameter and variable annotations are generally preferred). |
Maybe we should just deprecate type comment support. |
I believe type comments are part of PEP 484 so they would need to be deprecated and removed as part of the PEP, there is also the consideration of for/with statements, I've opened a new thread on typing-sig about this https://mail.python.org/archives/list/[email protected]/thread/66JDHQ2I3U3CPUIYA43W7SPEJLLPUETG/ |
This isn't worth fixing |
This fragment generates an error on the line
@deco
which is confusing:The text was updated successfully, but these errors were encountered: