Skip to content

Commit

Permalink
Adding the pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
Alon committed Sep 29, 2023
1 parent 2e1e948 commit 82f704f
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
ci:
skip: [mypy]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: debug-statements
- id: double-quote-string-fixer
- id: name-tests-test
args: [--django]
- id: check-case-conflict
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-added-large-files
args: ['--maxkb=8192']
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ['--remove']
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args:
- --in-place
- --pre-summary-newline
- --wrap-summaries=80
- --wrap-descriptions=80
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
hooks:
- id: autopep8
args:
- --in-place
- --max-line-length=80
- --ignore=E731
exclude: 'tests/ext.*'
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args:
- --py38-plus
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.10.0
hooks:
- id: reorder-python-imports
args:
- --add-import
- from __future__ import annotations
- --py37-plus
exclude: 'tests/ext.*'
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.1
hooks:
- id: add-trailing-comma
args:
- --py36-plus
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
hooks:
- id: autoflake
args:
- --in-place
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.0
hooks:
- id: mypy
exclude: tests/qis/test_pauli.py
additional_dependencies: ["numpy>=1.21"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- --ignore=E741,W503,F901,E731,TYP006,TYP001,TYP002
- --max-line-length=80
additional_dependencies: [flake8-typing-imports==1.13.0]

0 comments on commit 82f704f

Please sign in to comment.