Closed ni-jfitzger closed 5 months ago
I considered cleaning up some of the remaining .format() calls, but decided to leave this as only automated changes.
pyupgrade can be used as a pre-commit hook, but I don't think that would be a good idea, given that it broke the indentation of some of our templates.
[X] This contribution adheres to CONTRIBUTING.md.
~[ ] I've updated CHANGELOG.md if applicable.~
~[ ] I've added tests applicable for this pull request~
What does this Pull Request accomplish?
Note: No hand-coded changes are included.
Using a script, I ran
pyupgrade --py38-plus
on files in nimi-python. pyupgrade is a tool used to automatically update the syntax used in Python code to syntaxes available in newer versions.The script ran on the following folders:
The script ignored folder paths containing:
__pycache__
The script ignored files with the extensions:
The script ignored imported metadata files (the ones that say they were generated) as well as "fancy_fetch_capture_waveform.py.mako" (pyupgrade messed up the indentation) and "_get_error_description.py.mako" (pyupgrade messed up the indentation).
List of automatic changes that I noticed:
I discarded changes to test_converters.py. I believe we're not passing the right arguments for some tuple tests, so I want to handle that separately.
List issues fixed by this Pull Request below, if any.
None
What testing has been done?