-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 1.94 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 loc) · 1.94 KB
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
---
minimum_pre_commit_version: 2.4.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
# ----- Local Hooks --------------------------------------------------------------------------->
# <---- Local Hooks ----------------------------------------------------------------------------
# ----- Code Formatting and Analysis ---------------------------------------------------------->
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.270"
hooks:
- id: ruff
args:
- --fix
exclude: (.pre-commit-hooks/.*|docs/.*)\.py
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: [-l 100]
exclude: src/ptscripts/version.py
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
args: [--skip-errors]
files: ^(docs/.*\.rst|src/ptscripts/.*\.py)$
additional_dependencies:
- black==23.1.0
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
name: Run mypy against the code base
files: ^(src/|tests/).*\.py$
args: []
additional_dependencies:
- types-attrs
- types-setuptools
- types-requests
# <---- Code Formatting and Analysis -----------------------------------------------------------