-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
is_type_comment() is wrong #2097
Comments
I think there is also the pragmas in |
Should we also standardise spaces before the colon? Meaning we would accept (and fix) e.g. |
Hey everyone! Can I get some maintainer reivews on the PR? |
@Pierre-Sassoulas Hello... I am new here and I would like to start contributing in the repository. So can you please assign this issue to me |
Hey @IshanKamboj, sorry I'm not a black maintainer. I think you can start implementing right away and open a PR though :) |
hello i am new here and would like to contribute to the project can you help me out |
Currently, the implementation of
is_type_comment()
looks like this:But this is wrong, because typed-ast also recognizes a comment with multiple spaces after the
#
as a type comment. Concretely this could lead Black to skip some of the checks we have to avoid moving type comments to the wrong line.Ideally, Black should also standardize the formatting of type comments by cleaning up excessive whitespace after the
#
and after the:
.The text was updated successfully, but these errors were encountered: