-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
39 lines (37 loc) · 1.14 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
repos:
# Removes output and empty cells as well as metadata
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout
args:
[
--strip-empty-cells,
--extra-keys,
metadata.kernelspec metadata.language_info.version metadata.language_info.pygments_lexer metadata.language_info.codemirror_mode.version,
]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.3.1
hooks:
# Upgrades python style
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.31.1]
args: [--py38-plus]
# Sorts imports
- id: nbqa-isort
additional_dependencies: [isort==5.10.1]
# Formats code
- id: nbqa-black
additional_dependencies: [black==22.3.0]
# Detects code smells
- id: nbqa-flake8
# Checks that python code is valid
- id: nbqa-check-ast
# Checks for common spelling errors
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
types: [file]
types_or: [python, pyi, markdown, rst, jupyter]
args: [-L doas]