Skip to content

Commit

Permalink
update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
superbock committed Sep 9, 2023
1 parent 44f6cbd commit 8e899ed
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
ignore-words-list = linz
7 changes: 4 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[flake8]
ignore = E203,W503,Q000
max-line-length = 80
ignore = E203,W503
max-complexity = 18
max-line-length = 120
per-file-ignores =
*/__init__.py: F401
tests/***.py: F405
tests/*: F405
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
profile=black
known_madmom=madmom
sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER,MADMOM
line_length=120
44 changes: 40 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,63 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.4.0
hooks: # for a list of hooks see https://github.com/pre-commit/pre-commit-hooks
- id: check-added-large-files
args: ['--maxkb=100']
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: file-contents-sorter
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: name-tests-test
- id: no-commit-to-branch
- id: pretty-format-json
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [ '--settings-path', '.isort.cfg', '-a', 'from __future__ import annotations' ]
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args: [ '--py39-plus', '--keep-runtime-typing']
- repo: https://github.com/psf/black
rev: 23.9.0
hooks:
- id: black
entry: black -t py39 -l 120 -S .
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id:
autoflake
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0 # 6.0.0 with flake8-quotes raises ValueError
hooks:
- id: flake8
additional_dependencies: ['flake8-quotes']
- repo: https://github.com/PyCQA/prospector
rev: 1.10.2
hooks:
- id: prospector
additional_dependencies: [ 'pylint_pydantic' ]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
entry: codespell -w -i 3
32 changes: 32 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[pylint]

disable=
fixme,
import-error,
import-self,
invalid-name,
line-too-long,
locally-disabled,
logging-fstring-interpolation,
logging-not-lazy,
missing-function-docstring,
missing-class-docstring,
missing-module-docstring,
too-few-public-methods,
too-many-arguments,
too-many-instance-attributes,
too-many-locals,
undefined-variable,
ungrouped-imports,
unspecified-encoding,
unused-import,
unused-variable,
wrong-import-order,

extension-pkg-whitelist=
cv2

generated-members=
numpy.*,
scipy.*,
cv2.*,

0 comments on commit 8e899ed

Please sign in to comment.