NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Convert old-style strings to python f-strings #502

Closed mkavulich closed 1 year ago

mkavulich commented 1 year ago

Description

Since Python version 3.6, a much simpler method of handling variable substitutions in strings (Formatted string literals, or "F-strings" has been introduced. Since we have deprecated python 2, and all modern machines should support at least this version of python, we should convert all strings in the framework to use F-strings where appropriate.

Solution

Convert all old-format strings to f-string format.

Alternatives (optional)

Keep old-format strings, but this is undesirable. Plus there are already f-strings in the framework, so we already don't have compatibility with older Python versions.

mkavulich commented 1 year ago

Duplicate of #501