forked from nextcord/nextcord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
74 lines (68 loc) · 2.18 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
## Pre-commit setup
ci:
autofix_commit_msg: |
style: auto fixes from pre-commit hooks
autoupdate_commit_msg: |
ci(pre-commit): autoupdate hook versions
repos:
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
hooks:
- id: autoflake
name: Remove unused imports with autoflake.
args:
[
"--in-place",
"--remove-all-unused-imports",
"--ignore-init-module-imports",
"--ignore-pass-after-docstring",
"--exclude=discord/**",
]
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
name: Running black in all files.
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--extend-skip", "examples"]
name: Running isort in all files.
- id: isort
args: ["--profile", "black", "--thirdparty", "nextcord"]
name: Running isort in examples.
files: ^examples/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
name: Check if python files are valid syntax for the ast parser
- id: check-case-conflict
name: Check for case conflict on file names for case insensitive systems.
- id: check-merge-conflict
name: Check for merge conflict syntax.
- id: check-toml
name: Check TOML files for valid syntax.
- id: check-yaml
name: Check YAML files for valid syntax.
- id: debug-statements
name: Check for debug statements.
- id: end-of-file-fixer
name: Check for only one newline character at EOL.
- id: trailing-whitespace
name: Check for trailing whitespace.
args: [--markdown-linebreak-ext=md]
# Taken from numpy, for license info see scripts/autotyping.py
- repo: local
hooks:
- id: autotyping
name: Add repetitive type hints to the codebase.
entry: python -m scripts.autotyping
types_or: [python, pyi]
language: python
files: nextcord/
additional_dependencies:
- autotyping==22.9.0
- black==22.12.0
- libcst==0.4.9