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

Convert old python strings to f-strings #501

Open
peverwhee opened this issue Sep 25, 2023 · 0 comments
Open

Convert old python strings to f-strings #501

peverwhee opened this issue Sep 25, 2023 · 0 comments

Comments

@peverwhee
Copy link
Collaborator

Description

Now that we've removed support for python2 "officially" we should make an effort to go through and change all the old ".format" strings to "f" strings

Solution

Find all the old ".format()" strings and change them to "f" strings (with "{}" grammar). For example, changing:

ofile.write("end subroutine {}".format(API.__part_fname), 1)

To:

ofile.write(f"end subroutine {API.__part_fname}", 1)

Related to (optional)

Issue came up in #493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant