NOAA-GSL / ExascaleWorkflowSandbox

Other
2 stars 2 forks source link

Ugly use of .format() function with triple quote strings #74

Closed christopherwharrop-noaa closed 6 months ago

christopherwharrop-noaa commented 6 months ago

There are multiple instances where the .format() function is used for inserting variables into triple quoted strings. This makes the code ugly and hard to read. A far better approach is to use triple quote fstrings.

For example, instead of:

x = """hello {}""".format(name)

it would be better to use:

x=f"""hello {name}"""

We should fix these and stop using the .format() function going forward.