There are multiple instances where the .format() function is used for inserting variables into triple quoted strings.
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.
Looking into where the .format() function is used, it seems to be isolated to a single file, tests/test_parsl_flux_mpi_hello.py. I was able to perform a grep -Ri ".format(" src/ tests/ — for all instances of a piece of text and the result being the code section returned with a hit, and grep -Ril ".format(" src/ tests/ — for all instances of a piece of text and the resulting filenames that contain the code sections. It seems there are only six instances of the .format function being used in the file.
There are multiple instances where the
.format()
function is used for inserting variables into triple quoted strings. A far better approach is to use triple quote fstrings.For example, instead of:
it would be better to use:
We should fix these and stop using the
.format()
function going forward.Looking into where the .format() function is used, it seems to be isolated to a single file,
tests/test_parsl_flux_mpi_hello.py
. I was able to perform agrep -Ri ".format(" src/ tests/
— for all instances of a piece of text and the result being the code section returned with a hit, andgrep -Ril ".format(" src/ tests/
— for all instances of a piece of text and the resulting filenames that contain the code sections. It seems there are only six instances of the.format
function being used in the file.closes #74 .