-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add documentation examples of consider-using-f-string #6460
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
Changes from 1 commit
9767392
f3a98a5
68618c3
958df0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||||||||||||
| menu = ('eggs', 'spam') | ||||||||||||||||||||
|
|
||||||||||||||||||||
| order = "%s and %s" % menu # [consider-using-f-string] | ||||||||||||||||||||
|
|
||||||||||||||||||||
| new_order = "{1} and {0}".format(menu[0], menu[1]) # [consider-using-f-string] | ||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, thanks for introducing me to the |
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||
| menu = ('eggs', 'spam') | ||||||||||
|
|
||||||||||
| order = f"{menu[0]} and {menu[1]}" | ||||||||||
|
|
||||||||||
| new_order = f"{menu[1]} and {menu[0]}" | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
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.