Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Create pre-commits
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperDramsch authored Jan 26, 2024
1 parent 69da929 commit ca53f34
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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
- 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
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
hooks:
- id: bandit
args:
- -s
- B101
- repo: https://github.com/PyCQA/docformatter # Format docstrings
rev: v1.7.3
hooks:
- id: docformatter
args:
- -s numpy
- --black
- --in-place

0 comments on commit ca53f34

Please sign in to comment.