One of the nitpick issues mentioned in Slicer/ExtensionsIndex#2006 (review)
Adopt ruff linter/formatter and pre-commit-hooks from Slicer.
Relevant Slicer config files to add:
ruff config at https://github.com/Slicer/Slicer/blob/main/.ruff.toml
pre-commit config at https://github.com/Slicer/Slicer/blob/main/.pre-commit-config.yaml
GitHub actions to automatically run pre-commit at https://github.com/Slicer/Slicer/blob/main/.github/workflows/lint.yml