Skip to content

Commit 75cf1a6

Browse files
committed
add pre-commit hooks
1 parent 50720a3 commit 75cf1a6

File tree

5 files changed

+3018
-2637
lines changed

5 files changed

+3018
-2637
lines changed

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
2929
- name: Run tests
3030
run: |
31-
pytest # Run your tests using pytest
31+
pytest *.py # Run your tests using pytest

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# .pre-commit-config.yaml
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.5.0
5+
hooks:
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
10+
# code formatters
11+
- repo: https://github.com/psf/black
12+
rev: 25.1.0
13+
hooks:
14+
- id: black
15+
# A popular Python linter that combines pycodestyle, pyflakes, and McCabe complexity.
16+
#- repo: https://github.com/PyCQA/flake8
17+
# rev: 7.2.0
18+
# hooks:
19+
# - id: flake8
20+
# Sorts Python imports alphabetically and automatically separates them into sections
21+
- repo: https://github.com/pycqa/isort
22+
rev: 6.0.1
23+
hooks:
24+
- id: isort

0 commit comments

Comments
 (0)