Skip to content
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

STYLE: Update Python string formatting syntax #3239

Open
Leengit opened this issue Mar 1, 2022 · 1 comment
Open

STYLE: Update Python string formatting syntax #3239

Leengit opened this issue Mar 1, 2022 · 1 comment
Labels
type:Style Style changes: no logic impact (indentation, comments, naming)

Comments

@Leengit
Copy link
Contributor

Leengit commented Mar 1, 2022

Description

Replace the likes of old-style "My file is {file}".format(file=my_file) with new-style f"My file is {my_file}".

@Leengit Leengit added the type:Style Style changes: no logic impact (indentation, comments, naming) label Mar 1, 2022
@jamesobutler
Copy link
Contributor

jamesobutler commented Mar 2, 2022

You may find this helpful - I've generally used pyupgrade for automated string formatting updates with success. See the updating of python syntax to 3.6+ in Slicer/Slicer#6132 (Slicer was also going 3.9+ because it uses Python 3.9 now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Style Style changes: no logic impact (indentation, comments, naming)
Projects
None yet
Development

No branches or pull requests

2 participants