mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
4d0c830d2c
* ci(pre-commit): Add ``flake8-builtins`` additional dependency to ``pre-commit`` (#7104) * refactor: Fix ``flake8-builtins`` (#7104) * fix(lru_cache): Fix naming conventions in docstrings (#7104) * ci(pre-commit): Order additional dependencies alphabetically (#7104) * fix(lfu_cache): Correct function name in docstring (#7104) * Update strings/snake_case_to_camel_pascal_case.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update data_structures/stacks/next_greater_element.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update digital_image_processing/index_calculation.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update graphs/prim.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update hashes/djb2.py Co-authored-by: Christian Clauss <cclauss@me.com> * refactor: Rename `_builtin` to `builtin_` ( #7104) * fix: Rename all instances (#7104) * refactor: Update variable names (#7104) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: Create ``tox.ini`` and ignore ``A003`` (#7123) * revert: Remove function name changes (#7104) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename tox.ini to .flake8 * Update data_structures/heap/heap.py Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> * refactor: Rename `next_` to `next_item` (#7104) * ci(pre-commit): Add `flake8` plugin `flake8-bugbear` (#7127) * refactor: Follow `flake8-bugbear` plugin (#7127) * fix: Correct `knapsack` code (#7127) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.3.0
|
|
hooks:
|
|
- id: check-executables-have-shebangs
|
|
- id: check-yaml
|
|
- id: end-of-file-fixer
|
|
types: [python]
|
|
- id: trailing-whitespace
|
|
exclude: |
|
|
(?x)^(
|
|
data_structures/heap/binomial_heap.py
|
|
)$
|
|
- id: requirements-txt-fixer
|
|
|
|
- repo: https://github.com/psf/black
|
|
rev: 22.10.0
|
|
hooks:
|
|
- id: black
|
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
rev: 5.10.1
|
|
hooks:
|
|
- id: isort
|
|
args:
|
|
- --profile=black
|
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v3.0.0
|
|
hooks:
|
|
- id: pyupgrade
|
|
args:
|
|
- --py310-plus
|
|
|
|
- repo: https://github.com/PyCQA/flake8
|
|
rev: 5.0.4
|
|
hooks:
|
|
- id: flake8
|
|
args:
|
|
- --ignore=E203,W503
|
|
- --max-complexity=25
|
|
- --max-line-length=88
|
|
additional_dependencies:
|
|
- flake8-bugbear
|
|
- flake8-builtins
|
|
- pep8-naming
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v0.982
|
|
hooks:
|
|
- id: mypy
|
|
args:
|
|
- --ignore-missing-imports
|
|
- --install-types # See mirrors-mypy README.md
|
|
- --non-interactive
|
|
additional_dependencies: [types-requests]
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.2.1
|
|
hooks:
|
|
- id: codespell
|
|
args:
|
|
- --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar
|
|
- --skip="./.*,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt"
|
|
exclude: |
|
|
(?x)^(
|
|
strings/dictionary.txt |
|
|
strings/words.txt |
|
|
project_euler/problem_022/p022_names.txt
|
|
)$
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: validate-filenames
|
|
name: Validate filenames
|
|
entry: ./scripts/validate_filenames.py
|
|
language: script
|
|
pass_filenames: false
|