Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[
flake8-type-checking
] Support auto-quoting when annotations contain quotes #11811[
flake8-type-checking
] Support auto-quoting when annotations contain quotes #11811Changes from all commits
65a38e9
c8df851
d97e2bd
8ca1f5c
29e0d4a
1b58828
14f51e3
e8c0f90
c6ef3db
75f4407
3a253f6
bf363e2
f27ae89
2b58cbb
fbf0bb1
5079a8c
f7e19b4
26081a6
5c4b4df
d4602a2
114edd0
ff973d4
2c10896
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the code to use the semantic model to resolve the expression into its qualified name and we use that to match against the typing import. This way we make sure that any import aliases are correctly resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really appreciate your help and the reviews it thought me a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, the state would only append so it would be
[..., AnnotatedFirst, AnnotatedRest]
and later it would only pop theAnnotatedRest
state. I've updated this to replaceAnnotatedFirst
withAnnotatedRest
instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a branch for
Expr::BoolOp
although I don't think that's required. Can you confirm this? @GlyphackThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. I was not very familiar with syntax in type annotation but I don't see anything with a boolean operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've split the files because otherwise we run into the iteration limit in tests which is set to 10. We'd need to increase it substantially (~20) to fit all the test cases in a single file. The reason the limit needs to be increased seems unrelated to what's being changed in this PR and my guess for why it's happening is because the import edits are colliding.