-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update Q000
, Q001
with the new f-string tokens
#7589
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Sep 22, 2023
dhruvmanila
force-pushed
the
dhruv/issue-7297-2
branch
from
September 22, 2023 05:21
1d2fcf3
to
ec2f581
Compare
CodSpeed Performance ReportMerging #7589 will not alter performanceComparing Summary
|
dhruvmanila
changed the title
Update
Update Sep 22, 2023
Q000-002
with the new f-string tokensQ000
, Q001
with the new f-string tokens
dhruvmanila
added
rule
Implementing or modifying a lint rule
python312
Related to Python 3.12
labels
Sep 22, 2023
MichaReiser
approved these changes
Sep 22, 2023
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs
Outdated
Show resolved
Hide resolved
dhruvmanila
force-pushed
the
dhruv/issue-7297-2
branch
from
September 22, 2023 13:47
ec2f581
to
27f4eeb
Compare
dhruvmanila
force-pushed
the
dhruv/issue-7297
branch
from
September 22, 2023 13:49
587aa71
to
2d9069a
Compare
dhruvmanila
force-pushed
the
dhruv/issue-7297
branch
from
September 26, 2023 12:28
2d9069a
to
7753ce8
Compare
dhruvmanila
force-pushed
the
dhruv/issue-7297-2
branch
from
September 26, 2023 12:29
27f4eeb
to
715b5df
Compare
dhruvmanila
force-pushed
the
dhruv/issue-7297
branch
from
September 27, 2023 07:56
7753ce8
to
51f7ef1
Compare
dhruvmanila
force-pushed
the
dhruv/issue-7297-2
branch
from
September 27, 2023 07:56
715b5df
to
9eb2dc4
Compare
dhruvmanila
added a commit
that referenced
this pull request
Sep 28, 2023
## Summary This PR updates the `Q000`, and `Q001` rules to consider the new f-string tokens. The docstring rule (`Q002`) doesn't need to be updated because f-strings cannot be used as docstrings. I tried implementing the nested f-string support but there are still some edge cases in my current implementation so I've decided to pause it for now and I'll pick it up sometime soon. So, for now this doesn't support nested f-strings. ### Implementation The implementation uses the same `FStringRangeBuilder` introduced in #7586 to build up the outermost f-string range. The reason to use the same implementation is because this is a temporary solution until we add support for nested f-strings. ## Test Plan `cargo test`
dhruvmanila
added a commit
that referenced
this pull request
Sep 29, 2023
Summary
This PR updates the
Q000
, andQ001
rules to consider the new f-string tokens. The docstring rule (Q002
) doesn't need to be updated because f-strings cannot be used as docstrings.I tried implementing the nested f-string support but there are still some edge cases in my current implementation so I've decided to pause it for now and I'll pick it up sometime soon. So, for now this doesn't support nested f-strings.
Implementation
The implementation uses the same
FStringRangeBuilder
introduced in #7586 to build up the outermost f-string range. The reason to use the same implementation is because this is a temporary solution until we add support for nested f-strings.Test Plan
cargo test