2020-09-30 08:39:14 +00:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-11-29 15:56:41 +00:00
|
|
|
rev: v4.4.0
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
types: [python]
|
2020-10-15 11:20:43 +00:00
|
|
|
- id: trailing-whitespace
|
2020-09-30 08:39:14 +00:00
|
|
|
- id: requirements-txt-fixer
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2022-10-28 13:54:54 +00:00
|
|
|
- repo: https://github.com/MarcoGorelli/auto-walrus
|
2022-12-19 22:04:34 +00:00
|
|
|
rev: v0.2.2
|
2022-10-28 13:54:54 +00:00
|
|
|
hooks:
|
|
|
|
- id: auto-walrus
|
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://github.com/psf/black
|
2022-12-12 20:29:50 +00:00
|
|
|
rev: 22.12.0
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: black
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
2022-12-26 21:02:50 +00:00
|
|
|
rev: 5.11.4
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
args:
|
|
|
|
- --profile=black
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2021-10-28 14:45:59 +00:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2022-12-12 20:29:50 +00:00
|
|
|
rev: v3.3.1
|
2021-10-28 14:45:59 +00:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
args:
|
2022-11-15 17:34:17 +00:00
|
|
|
- --py311-plus
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2022-10-03 20:00:45 +00:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2022-11-29 15:56:41 +00:00
|
|
|
rev: 6.0.0
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
2022-10-14 14:34:44 +00:00
|
|
|
- id: flake8 # See .flake8 for args
|
2022-10-29 13:07:02 +00:00
|
|
|
additional_dependencies: &flake8-plugins
|
2022-10-13 16:03:06 +00:00
|
|
|
- flake8-bugbear
|
|
|
|
- flake8-builtins
|
2022-11-29 15:56:41 +00:00
|
|
|
# - flake8-broken-line
|
2022-10-15 17:29:42 +00:00
|
|
|
- flake8-comprehensions
|
2022-10-13 16:03:06 +00:00
|
|
|
- pep8-naming
|
2022-10-29 13:07:02 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/asottile/yesqa
|
|
|
|
rev: v1.4.0
|
|
|
|
hooks:
|
|
|
|
- id: yesqa
|
|
|
|
additional_dependencies:
|
|
|
|
*flake8-plugins
|
2021-11-16 14:01:17 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2022-11-15 17:34:17 +00:00
|
|
|
rev: v0.991
|
2021-11-16 14:01:17 +00:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
|
|
|
args:
|
|
|
|
- --ignore-missing-imports
|
2022-10-14 14:34:44 +00:00
|
|
|
- --install-types # See mirrors-mypy README.md
|
2021-11-16 14:01:17 +00:00
|
|
|
- --non-interactive
|
2022-10-02 19:59:17 +00:00
|
|
|
additional_dependencies: [types-requests]
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2022-10-17 19:59:25 +00:00
|
|
|
rev: v2.2.2
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
|
|
|
args:
|
2022-10-03 20:00:45 +00:00
|
|
|
- --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar
|
2020-09-30 08:39:14 +00:00
|
|
|
exclude: |
|
|
|
|
(?x)^(
|
2022-10-17 19:59:25 +00:00
|
|
|
ciphers/prehistoric_men.txt |
|
2021-03-21 11:05:10 +00:00
|
|
|
strings/dictionary.txt |
|
2021-03-22 10:40:23 +00:00
|
|
|
strings/words.txt |
|
2020-10-15 07:13:28 +00:00
|
|
|
project_euler/problem_022/p022_names.txt
|
2020-09-30 08:39:14 +00:00
|
|
|
)$
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: validate-filenames
|
|
|
|
name: Validate filenames
|
|
|
|
entry: ./scripts/validate_filenames.py
|
|
|
|
language: script
|
|
|
|
pass_filenames: false
|