This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy path.pre-commit-config.yaml
108 lines (100 loc) · 2.92 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
default_language_version:
python: python311
default_stages: [commit]
repos:
# Common pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ['--maxkb=20000']
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-symlinks
- id: check-json
- id: check-xml
- id: check-toml
- id: check-yaml
args: ['--unsafe']
- id: detect-private-key
- id: end-of-file-fixer
- id: pretty-format-json
args: ['--autofix']
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: debug-statements
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
hooks:
- id: prettier
args: ['--tab-width', '2', '--single-quote']
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
name: black
description: 'Black: The uncompromising Python code formatter'
entry: black
language: python
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi]
- id: black-jupyter
name: black-jupyter
description: 'Black: The uncompromising Python code formatter (with Jupyter Notebook support)'
entry: black
language: python
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi, jupyter]
additional_dependencies: ['.[jupyter]']
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
name: isort
description: 'Sorts import statements'
entry: isort
require_serial: true
language: python
language_version: python3
types_or: [cython, pyi, python]
args:
- '--filter-files'
- '--profile=black'
- '--multi-line=3'
- '--trailing-comma'
minimum_pre_commit_version: '2.9.2'
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
description: '`flake8` is a command-line utility for enforcing style consistency across Python projects.'
entry: flake8
language: python
types: [python]
require_serial: true
additional_dependencies:
[
'flake8-bugbear',
'flake8-comprehensions',
'flake8-mutable',
'flake8-print',
'flake8-simplify',
]
args:
- '--max-complexity=12'
- '--ignore=E501,W503,E203,F405,F403,F401'
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
skip: []
submodules: false