Skip to content

Commit 92f1b3e

Browse files
committed
chore: add Python code style and linting hooks to pre-commit configuration
1 parent 6bb7670 commit 92f1b3e

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,35 @@ repos:
5656
- id: requirements-txt-fixer
5757
- id: sort-simple-yaml
5858
- id: trailing-whitespace
59+
5960
- repo: https://github.com/asottile/pyupgrade
6061
rev: v3.20.0
6162
hooks:
6263
- id: pyupgrade
64+
65+
- repo: https://github.com/psf/black
66+
rev: 23.9.1
67+
hooks:
68+
- id: black
69+
args: [ --line-length=88 ]
70+
71+
- repo: https://github.com/pycqa/isort
72+
rev: 5.12.0
73+
hooks:
74+
- id: isort
75+
args: [ "--profile", "black" ]
76+
77+
- repo: https://github.com/pycqa/autoflake
78+
rev: v2.2.1
79+
hooks:
80+
- id: autoflake
81+
args:
82+
- --in-place
83+
- --remove-all-unused-imports
84+
- --remove-unused-variables
85+
86+
- repo: https://github.com/pycqa/flake8
87+
rev: 6.1.0
88+
hooks:
89+
- id: flake8
90+
additional_dependencies: [ flake8-bugbear ]

0 commit comments

Comments
 (0)