rueckstiess / mtools

A collection of scripts to set up MongoDB test environments and parse and visualize MongoDB log files.
Apache License 2.0
1.89k stars 404 forks source link

Issue 787: Replace OG Python string formatting with f-strings #838

Closed joedougherty closed 3 years ago

joedougherty commented 3 years ago

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:

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/3d7dec2073811a0490bb1d2a53cff952

Should 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.

O/S testing: O/S Version(s)
macOS 10.15.7

No testing was done on Windows or Linux.

stennie commented 3 years ago

@joedougherty Thanks for the PR! Apologies for taking a loooong while to review & merge :)

Cheers, Stennie