default_language_version: python: python3.10 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-executables-have-shebangs - id: end-of-file-fixer - id: mixed-line-ending args: [--fix=lf] - id: trailing-whitespace - 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 name: isort - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: - id: flake8 additional_dependencies: [ 'flake8-bugbear==22.6.22', 'pep8-naming==0.13.0' ] - repo: https://github.com/pycqa/pydocstyle rev: 6.1.1 hooks: - id: pydocstyle exclude: 'setup.py|scratch/' # Because complaining about docstrings here is annoying. - repo: https://github.com/pre-commit/mirrors-mypy rev: 'v0.991' hooks: - id: mypy # Passing filenames to mypy can do odd things. See # https://github.com/pre-commit/mirrors-mypy/issues/33. # mypy.ini determines the set of files that will actually be checked. pass_filenames: false # The pre-commit hook passes some options, but we set options in mypy.ini. args: [] # The pre-commit hook only has python, not pyi. types: [] types_or: [python, pyi]