repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: # python - id: check-ast - id: check-builtin-literals - id: check-docstring-first - id: debug-statements - id: fix-encoding-pragma args: [--remove] # text - id: check-executables-have-shebangs - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: detect-private-key - id: end-of-file-fixer - id: fix-byte-order-marker - id: mixed-line-ending args: [--fix=lf] - id: trailing-whitespace # json - id: check-json # toml - id: check-toml # yaml - id: check-yaml # python - repo: https://github.com/pre-commit/mirrors-isort rev: v5.10.1 hooks: - id: isort args: [--profile, black] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.971 hooks: - id: mypy additional_dependencies: [types-all] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.9.0 hooks: - id: python-check-blanket-noqa - id: python-check-blanket-type-ignore - id: python-no-eval - id: python-use-type-annotations - repo: https://github.com/asottile/dead rev: v1.5.0 hooks: - id: dead args: [--exclude, ups/schemas/.*] - repo: https://github.com/asottile/pyupgrade rev: v2.37.3 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/psf/black/ rev: 22.6.0 hooks: - id: black language_version: python3.10 - repo: https://github.com/PyCQA/bandit rev: 1.7.4 hooks: - id: bandit args: [--severity-level, medium] - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports==1.12.0] args: [--max-line-length, '120'] # yaml - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt rev: 0.2.2 hooks: - id: yamlfmt args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100', --implicit_start]