-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
70 lines (69 loc) · 2.59 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
---
minimum_pre_commit_version: 4.0.1
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
description: Check for files that contain merge conflict strings.
language_version: python3
- id: mixed-line-ending
description: Replaces or checks mixed line ending.
args: [--fix=lf]
exclude: make.bat
- id: fix-byte-order-marker
description: Removes UTF-8 BOM if present, generally a Windows problem.
language_version: python3
- id: end-of-file-fixer
description: Makes sure files end in a newline and only a newline.
language_version: python3
- id: check-ast
description: Simply check whether files parse as valid python.
language_version: python3
- id: check-yaml
- id: trailing-whitespace
- id: file-contents-sorter
name: File Contents Sorter
description: |
Sort the lines in specified files (defaults to alphabetical).
You must provide list of target files as input in your .pre-commit-config.yaml file.
files: ^(.*requirements.*\.txt|\.brokignore)$
- repo: https://github.com/PyCQA/isort
rev: "5.13.2"
hooks:
- id: isort
description: isort is a Python utility / library to sort imports automatically.
files: ^((noxfile|conf)|docs/.*)\.py$
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
description: Forces best practice formatting of Python code files.
files: ^((noxfile|conf)|docs/conf|tools/version-updater|docs/_includes/python/.*)\.py$
- repo: https://github.com/myint/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
description: Checks syntax of reStructuredText/rst and code blocks nested within it.
args: [--report-level=warning]
additional_dependencies: [sphinx]
files: ^(index|docs/.*|docs/_includes/.*|README|CONTRIBUTING)\.rst$
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
description: Run black on python code blocks in documentation files.
files: ^(index|docs/.*|docs/_includes/.*)\.rst$
additional_dependencies: [black==24.10.0]
# - repo: https://github.com/saltstack/mirrors-nox
# rev: v2022.11.21
# hooks:
# - id: nox
# alias: Generate Sphinx docs
# description: Generate Sphinx docs, ensure they build
# pass_filenames: false
# args:
# - -e
# - 'docs-html(download_versions=True, clean=True)'
# - --
# - -vv