forked from AlJohri/docx2pdf
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
64 lines (64 loc) · 2.95 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
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files # prevents giant files from being committed
args: [--enforce-all]
- id: check-ast # simply checks whether the files parse as valid python
- id: check-builtin-literals # requires literal syntax for builtin types
- id: check-case-conflict # checks case-insensitive naming conflicts
- id: check-docstring-first # checks for docstrings defined after code
- id: check-executables-have-shebangs # ensures executables have shebangs
- id: check-json # checks json files for parseable syntax
- id: check-shebang-scripts-are-executable # makes shebangers executable
- id: pretty-format-json # sets a standard for formatting json files
args: [--autofix, --indent]
- id: check-merge-conflict # checks for files containing merge conflicts
- id: check-symlinks # checks for symlinks which do not point to anything
- id: check-toml # checks toml files for parseable syntax
- id: check-vcs-permalinks # ensures that links to vcs are permalinks
- id: check-xml # checks xml files for parseable syntax
- id: check-yaml # checks yaml files for parseable syntax
- id: debug-statements # checks for debugger imports and `breakpoint()`
- id: destroyed-symlinks # detects symlinks which are changed to text
- id: detect-private-key # detects the presence of private keys
- id: end-of-file-fixer # ensures non-empty files end in newlines
- id: fix-byte-order-marker # removes utf-8 byte order marker
- id: fix-encoding-pragma # removes encoding from the top of python files
args: [--remove]
- id: forbid-submodules # forbids any submodules in the repository
- id: mixed-line-ending # replaces or checks mixed line ending
- id: name-tests-test # verifies that test files are named correctly
args: [--pytest-test-first]
- id: requirements-txt-fixer # sorts entries in requirements.txt
- id: trailing-whitespace # trims trailing whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.261
hooks:
- id: ruff
args: [--fix-only]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
args: [--number]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.2
hooks:
- id: validate-pyproject
- repo: https://github.com/python-poetry/poetry
rev: 1.4.2
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: [--without-hashes, -f, requirements.txt, -o, requirements.txt]