This repository was archived by the owner on Dec 30, 2023. It is now read-only.
generated from nextpart/devenv-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
83 lines (74 loc) · 2.89 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# PRE COMMIT CONFIGURATION FILE
# ---------------------------------------------------------
# Copyright (C) 2021 Nextpart Security Intelligence GmbH
# All rights reserved. - Proprietary and confidential
# The pre-commit file serves only to detect formatting errors or
# similar and is not intended to change the code by e.g. sorting
# imports, because that is what the lint in tox is for.
repos:
# Common stuff and checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
args: [--maxkb=800]
- id: detect-private-key
- id: check-ast # Simply check whether the files parse as valid python.
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-docstring-first # Checks a common error of defining a docstring after code.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls.
- id: trailing-whitespace # This hook trims trailing whitespace.
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline.
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
exclude: &fixtures tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
args:
- --in-place
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- --remove-all-unused-imports
- --ignore-init-module-imports
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
args: [--settings-file, pyproject.toml]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
args: ["--line-length=100"]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==21.12b0]
exclude: ^.github/
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout
files: ".ipynb"
args: ["--keep-output", "--extra-keys", "metadata.kernelspec"]
- repo: https://github.com/myint/rstcheck
rev: v5.0.0 # "3f92957478422df87bd730abde66f089cc1ee19b"
hooks:
- id: rstcheck
args:
[
"--report=warning",
"--ignore-directives=panels,tabbed,mdinclude,dropdown,link-button,needtable,doctest,needflow,req,spec,impl,test,test-report",
]
types: [text] # necessary to include ChangeLog file
files: ^(ChangeLog|doc/(.*/)*.*\.rst)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=100]