Refactor and upgrade code base and improve sphinx setup
This MR refactors the code base to reduce tech debt. The main changes are:
- consistently use f-strings instead of format strings
- use tuple comprehensions instead of
tuple([...])
These were carried out by the asottile/pyupgrade
package and via the
corresponding pre-commit stage.
The changes introduced here may (!) include breaking change for Python 3.6, which is not tested explicitly but is implicitly supported. However, Python 3.6 is so old, that we should not look at that too much.
I also considered dropping official support for Python 3.7, which was released in 2018. Even in Ubuntu 20.04 LTS, the default Python is 3.8, so I wouldn't expect a big issue here. However, there would be no immediate benefits from refactoring or code base upgrades, so we can just keep it for now.
Other
Can this MR be accepted?
-
Implementation ready -
Code cleanup -
Sphinx setup upgrade
-
-
Tests added or adjusted -
Documentation extended or updated
-
Code quality -
Changes follow coding guidelines -
Checked code coverage on new and adjusted code
-
-
Ready for merging -
Pipeline passes without warnings -
History cleaned-up or squash option set -
Changelog entry added -
Version number bumped -
Reviewed & approved by @
-
Edited by Utopia Developers