-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
30 lines (28 loc) · 990 Bytes
/
.pre-commit-config.yaml
File metadata and controls
30 lines (28 loc) · 990 Bytes
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
name: "Autoflake: Remove unused variables and imports..."
entry: bash -c 'autoflake "$@"; git add -u' -- # This runs autoflake and stages the reformatted python files before running autoflake again, which should then "pass"
language: python
args:
- "--in-place"
- "--remove-all-unused-imports"
- "--expand-star-imports"
- "--remove-duplicate-keys"
- "--remove-unused-variables"
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
name: "Black: Code formatting..."
entry: bash -c 'black "$@"; git add -u' --
language_version: python3.10
args: [--line-length=80]