-
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
incorrect 'error: Unnecessary "# type: ignore" comment' #4294
Comments
Yes, this is intended behavior. This is a side effect of a recent change. Previously, |
It would be nice if you could comment out a block of code without getting "information" warnings about Is ignoring this warning if the entire line is just a comment possible? |
Yeah, as a pyright user I strongly agree with this — when you comment out a block of code you want it to be... commented out, as if it doesn't exist. You don't want your type checker to complain that something is wrong with it. What's the rationale for flagging |
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
Describe the bug
pyright 1.1.283 reports incorrect 'error: Unnecessary "# type: ignore" comment' in commented out code.
Enhancement of 1.1.283
Added support for # pyright: ignore and # type: ignore comments that are not at the start of a comment.
produces this bug?
To Reproduce
Check this snippet by pyright 1.1.283
Expected behavior
"# type: ignore" comment in commented out code should be ignored.
The text was updated successfully, but these errors were encountered: