Ignore string literals in f-strings #3548#3551
Merged
sobolevn merged 3 commits intowemake-services:masterfrom Oct 21, 2025
Merged
Ignore string literals in f-strings #3548#3551sobolevn merged 3 commits intowemake-services:masterfrom
sobolevn merged 3 commits intowemake-services:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3551 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 369 369
Lines 12252 12263 +11
Branches 843 844 +1
=========================================
+ Hits 12252 12263 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sobolevn
reviewed
Oct 21, 2025
| @pytest.mark.parametrize( | ||
| 'strings', | ||
| [ | ||
| """ |
Member
There was a problem hiding this comment.
Please, move all examples to a module level.
| message = f'Hello, {world}' | ||
| """, | ||
| """ | ||
| first = f'test {value}' |
Member
There was a problem hiding this comment.
These examples are all the same. Better let's place the patterns in different places.
For example:
"Hello, {pattern}""{pattern}-postfix"
Comment on lines
+84
to
+85
| parent = walk.get_closest_parent(node, parents=(ast.JoinedStr,)) | ||
| if isinstance(parent, ast.JoinedStr): |
Member
There was a problem hiding this comment.
Suggested change
| parent = walk.get_closest_parent(node, parents=(ast.JoinedStr,)) | |
| if isinstance(parent, ast.JoinedStr): | |
| # Part of the f-string: | |
| if walk.get_closest_parent(node, parents=(ast.JoinedStr,)): |
sobolevn
reviewed
Oct 21, 2025
Member
sobolevn
left a comment
There was a problem hiding this comment.
Thanks! One more thing: please, update CHANGELOG.md
Contributor
Author
|
@sobolevn Done! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
WPS226false positive on fstring parts #3548