Convert old python strings to f-strings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 25
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
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 https://github.com/NCAR/ccpp-framework/pull/493
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the repository for old .format() strings and review the context of PR #493 first. Convert applicable Python 2-era formatting to f-strings, then verify that the repository's existing checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100