-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
72 lines (71 loc) · 2.33 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
# For more information about pre-commit:
# Fore more hooks: https://pre-commit.com/hooks.html
# Note: custom hooks can be developed as well in the form of a Python modules
default_language_version:
python: "3.12"
fail_fast: true
exclude: ^.run/|.*/migrations/.*
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-docstring-first
- id: mixed-line-ending
- id: check-builtin-literals
- id: check-ast
- id: check-toml
- id: check-json
- id: check-yaml
- id: pretty-format-json
args: ["--no-sort-keys","--autofix","--no-ensure-ascii"]
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- repo: https://github.com/python-poetry/poetry
rev: '1.8.0'
hooks:
- id: poetry-check
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
name: "Sort Python imports alphabetically and by scope (local, built-in, external libraries)"
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
name: "Format code with black so it looks the same whoever wrote it"
language_version: python3
- repo: https://github.com/jendrikseipp/vulture
rev: v2.11
hooks:
- id: vulture
name: "Check for unused Python code"
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
name: "Bandit - Because security issues should be fixed early and CANNOT be ignored"
args: [-c, pyproject.toml]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
name: "Flake8 - a wrapper around these tool: PyFlakes, pycodestyle and Ned Batchelder's McCabe script"
- repo: https://github.com/pylint-dev/pylint
rev: v3.2.6
hooks:
- id: pylint
name: "Pylint - checks for errors, enforces a coding standard, looks for code smells, and can make suggestions about how the code could be refactored."
entry: pylint
language: system
types: [ python ]
require_serial: true
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
]