I suggest moving Pywikibot's linters/code formatters to [[ https://pre-commit.com/ | pre-commit ]].
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/684050 is a proof of concept patch.
```
git-review -d 684050 # checkout the POC patch
pip install pre-commit # Install pre-commit
pre-commit install # Install pre-commit's pre-commit hook
git commit ... # pre-commit will run on the files changed
pre-commit uninstall # Unnstall pre-commit's pre-commit hook
pre-commit run --all-files # Run pre-commit on all files
```
| Include? | Hook | Description
| ---- | ---- | ----
| | check-added-large-files |
| | check-ast |
| | check-builtin-literals |
| | check-docstring-first |
| | check-json |
| | check-merge-conflict |
| | check-symlinks |
| | check-toml |
| | check-vcs-permalinks |
| | check-xml |
| | check-yaml |
| | debug-statements |
| | destroyed-symlinks |
| | |
| | |
| | |
| | |
| | |
| | |
Please take a look and share your thoughts about using pre-commit in Pywikibot development.