Closed joedougherty closed 3 years ago
This PR aims to address issue https://github.com/rueckstiess/mtools/issues/787
I've replaced the overwhelming majority of .format() instances with equivalent f-strings.
.format()
Remaining .format()s:
mtools/test/test_mloginfo.py
mtools/util/print_table.py
mtools/mlogfilter/mlogfilter.py
In these cases it was much less obvious to me how to rework the code to use f-strings, so I've left them in their prior state.
I ran the included test suite (via tox) to ensure no regressions occurred. All tests pass for:
tox output for all four Python environments can be found here: https://gist.github.com/joedougherty/3d7dec2073811a0490bb1d2a53cff952
tox
Curious to know if you think the test suite ought to be extended for better coverage.
As stated above, these changes have been tested with the existing test suite, but may benefit from closer treatment.
Please let me know if you think this is the case.
No testing was done on Windows or Linux.
@joedougherty Thanks for the PR! Apologies for taking a loooong while to review & merge :)
Cheers, Stennie
Description of changes
This PR aims to address issue https://github.com/rueckstiess/mtools/issues/787
I've replaced the overwhelming majority of
.format()
instances with equivalent f-strings.Remaining
.format()
s:mtools/test/test_mloginfo.py
(line 100)mtools/util/print_table.py
(line 28)mtools/mlogfilter/mlogfilter.py
(line 171)In these cases it was much less obvious to me how to rework the code to use f-strings, so I've left them in their prior state.
Testing
I ran the included test suite (via tox) to ensure no regressions occurred. All tests pass for:
tox
output for all four Python environments can be found here: https://gist.github.com/joedougherty/3d7dec2073811a0490bb1d2a53cff952Should there be Additional Test Coverage?
Curious to know if you think the test suite ought to be extended for better coverage.
As stated above, these changes have been tested with the existing test suite, but may benefit from closer treatment.
Please let me know if you think this is the case.
No testing was done on Windows or Linux.