diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb9748a..0269aba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,46 +1,29 @@ repos: -- repo: https://github.com/asottile/yesqa # Remove extraneous QA comments - rev: v1.5.0 - hooks: - - id: yesqa - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: check-yaml # Check YAML files for syntax errors - id: debug-statements # Check for debugger imports and py37+ breakpoint() - - id: end-of-file-fixer # Ensure files end in a newline - - id: trailing-whitespace # Trailing whitespace checker -# conflicting with "isort" -# - repo: https://github.com/asottile/reorder-python-imports # Reorder imports -# rev: v3.10.0 -# hooks: -# - id: reorder-python-imports -- repo: https://github.com/asottile/pyupgrade # Upgrade Python syntax - rev: v3.7.0 - hooks: - - id: pyupgrade -- repo: https://github.com/psf/black # Format Python code - rev: 23.3.0 - hooks: - - id: black - args: [--line-length=120] -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.275 +# - id: end-of-file-fixer # Ensure files end in a newline +# - id: trailing-whitespace # Trailing whitespace checker + - id: no-commit-to-branch # Prevent committing to main / master +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.1.1 hooks: - - id: ruff - args: [--line-length=120, '--ignore=E203', --fix, --exit-non-zero-on-fix] -- repo: https://github.com/pycqa/bandit # Check code for common security issues - rev: 1.7.5 + - id: black + args: [--line-length=120] +- repo: https://github.com/pycqa/isort + rev: 5.13.2 hooks: - - id: bandit - args: - - -s - - B101 -- repo: https://github.com/PyCQA/docformatter # Format docstrings - rev: v1.7.3 + - id: isort + name: isort (python) + - id: isort + name: isort (cython) + types: [cython] + - id: isort + name: isort (pyi) + types: [pyi] +- repo: https://github.com/pycqa/flake8 + rev: 7.0.0 hooks: - - id: docformatter - args: - - -s numpy - - --black - - --in-place + - id: flake8