-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
54 lines (50 loc) · 1.31 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
repos:
# 1. Organiza os imports primeiro
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--skip=Scripts"]
# 2. Formata o código depois
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: ["--exclude=Scripts"]
# 3. Faz linting e correções adicionais no final
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args: ["--fix", "--exclude=Scripts"]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args:
- --max-line-length=88
- --ignore=E203,W503,E501
- --exclude=Scripts
# bandit linter
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
name: bandit
description: "Bandit is a tool for finding common security issues in Python code"
entry: bandit
language: python
language_version: python3
types: [python]
require_serial: true
args:
- "-c"
- "pyproject.toml"
- -o
- bandit_results.html
- -f
- html
- -s
- B404,B603,B105,B605,B607
- --exclude=Scripts
additional_dependencies: ["bandit[toml]"]