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