pre-commit, tox: Bump pre-commit, codespell, black and flake8
- pre-commit from 4.1.0 to 4.3.0,
- codespell from 2.2.1 to 2.2.2,
- black from 22.3.0 to 22.10.0 and
- flake8 from 4.0.1 to 5.0.4. Also freeze flake8 dependencies.
Also change flake8's repo config to github (the gitlab mirror being outdated).
Migrated from D8722 (view on Phabricator)