1+ # -*- coding: utf-8 -*-
2+ # Copyright (C) 2023 Benjamin Thomas Schwertfeger
3+ # GitHub: https://github.com/btschwertfeger
4+ #
5+
16repos :
27 - repo : https://github.com/astral-sh/ruff-pre-commit
3- rev : v0.4.9
8+ rev : v0.7.0
49 hooks :
510 - id : ruff
6- args : [--fix]
11+ args :
12+ - --fix
13+ - --preview
14+ - --exit-non-zero-on-fix
715 - id : ruff-format
8- - repo : https://github.com/pycqa/flake8
9- rev : 7.1.0
10- hooks :
11- - id : flake8
12- args : ["--select=E9,F63,F7,F82", "--show-source", "--statistics"]
1316 # - repo: https://github.com/pre-commit/mirrors-mypy # FIXME
14- # rev: v1.8 .0
17+ # rev: v1.13 .0
1518 # hooks:
1619 # - id: mypy
1720 # name: mypy
@@ -23,14 +26,14 @@ repos:
2326 rev : v2.3.0
2427 hooks :
2528 - id : codespell
26- additional_dependencies :
27- - tomli
29+ additional_dependencies : [tomli]
2830 - repo : https://github.com/pre-commit/pre-commit-hooks
2931 rev : v4.6.0
3032 hooks :
3133 # all available hooks can be found here: https://github.com/pre-commit/pre-commit-hooks/blob/main/.pre-commit-hooks.yaml
3234 - id : check-yaml
3335 - id : check-ast
36+ - id : check-json
3437 - id : check-toml
3538 - id : check-docstring-first
3639 - id : check-case-conflict
@@ -53,26 +56,32 @@ repos:
5356 rev : v1.10.0
5457 hooks :
5558 - id : python-use-type-annotations
59+ - id : python-check-blanket-noqa
60+ - id : python-check-blanket-type-ignore
61+ - id : python-check-mock-methods
62+ - id : rst-backticks
63+ - id : python-no-eval
64+ - id : python-no-log-warn
5665 - id : rst-backticks
57- # - id: rst-inline-touching-normal
66+ - id : rst-inline-touching-normal
5867 - id : rst-directive-colons
5968 - id : text-unicode-replacement-char
60- # - repo: https://github.com/psf/black
61- # rev: 24.2.0
62- # hooks:
63- # - id: black
64- # - repo: https://github.com/adamchainz/blacken-docs
65- # rev: 1.16.0
66- # hooks:
67- # - id: blacken-docs
68- # additional_dependencies: [black==23.12.0]
6969 - repo : https://github.com/PyCQA/isort # TODO: remove as soon as ruff is stable
7070 rev : 5.13.2
7171 hooks :
7272 - id : isort
73- args : ["--profile=black"] # solves conflicts between black and isort
74- - repo : https://github.com/pre-commit/mirrors-prettier
75- rev : v3.0.2
73+ args : [--profile=black]
74+ - repo : https://github.com/PyCQA/bandit
75+ rev : 1.7.10
76+ hooks :
77+ - id : bandit
78+ exclude : " ^tests/.*|examples/.*"
79+ - repo : https://github.com/yunojuno/pre-commit-xenon
80+ rev : v0.1
7681 hooks :
77- - id : prettier
82+ - id : xenon
83+ args :
84+ - --max-average=B
85+ - --max-modules=B
86+ - --max-absolute=C
7887exclude : ' \.nc$|^tests/fixture/|\.ipynb$'
0 commit comments