2020-09-30 08:39:14 +00:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2021-03-20 05:12:17 +00:00
|
|
|
rev: v3.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
|
|
|
|
exclude: |
|
|
|
|
(?x)^(
|
|
|
|
data_structures/heap/binomial_heap.py
|
|
|
|
)$
|
2020-09-30 08:39:14 +00:00
|
|
|
- id: requirements-txt-fixer
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://github.com/psf/black
|
2021-04-26 05:46:50 +00:00
|
|
|
rev: 21.4b0
|
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
|
2021-04-26 05:46:50 +00:00
|
|
|
rev: 5.8.0
|
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
|
|
|
|
rev: v2.29.0
|
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
args:
|
|
|
|
- --py39-plus
|
2021-11-16 14:01:17 +00:00
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://gitlab.com/pycqa/flake8
|
2021-04-26 05:46:50 +00:00
|
|
|
rev: 3.9.1
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
args:
|
|
|
|
- --ignore=E203,W503
|
|
|
|
- --max-complexity=25
|
|
|
|
- --max-line-length=88
|
2021-11-16 14:01:17 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
|
|
rev: v0.910
|
|
|
|
hooks:
|
|
|
|
- id: mypy
|
|
|
|
args:
|
|
|
|
- --ignore-missing-imports
|
|
|
|
- --install-types # See mirrors-mypy README.md
|
|
|
|
- --non-interactive
|
|
|
|
|
2020-09-30 08:39:14 +00:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2021-03-20 05:12:17 +00:00
|
|
|
rev: v2.0.0
|
2020-09-30 08:39:14 +00:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
|
|
|
args:
|
2021-03-20 05:12:17 +00:00
|
|
|
- --ignore-words-list=ans,crate,fo,followings,hist,iff,mater,secant,som,tim
|
2021-03-22 10:40:23 +00:00
|
|
|
- --skip="./.*,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt"
|
2020-09-30 08:39:14 +00:00
|
|
|
exclude: |
|
|
|
|
(?x)^(
|
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
|