Files
ada_language_server/.pre-commit-config.yaml
2024-12-04 16:18:47 +00:00

46 lines
1.4 KiB
YAML

repos:
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
types: [file]
files: \.(py|anod|plan)$
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
# - flake8-docstrings
# - flake8-rst-docstrings
- repo: https://github.com/ambv/black
rev: 24.2.0
hooks:
- id: black
types_or: [file]
files: \.(py|plan)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
files: '\.py$'
args:
# These flags make mypy associate different module names to `test.py`
# files from different test directories.
- --explicit-package-bases
- --namespace-packages
additional_dependencies:
- pytest-lsp
- e3-testsuite
- psutil
- types-psutil
- repo: local
hooks:
# This hook checks that Python test directories are valid module names so
# that mypy will accept to analyse multiple test.py in different
# directories.
- id: py-filenames
name: Python test.py paths
entry: Python path components should be valid modules names (e.g. no '.' or whitespace). This is for mypy to accept dealing with test.py files in different directories.
language: fail
files: 'testsuite.*[^A-Za-z0-9_\/].*test\.py$'