chore: re-enable pre-commit

This commit is contained in:
Javier Martinez 2024-07-17 14:13:52 +02:00
parent bdd0bb7425
commit a45c07d2ad
No known key found for this signature in database
2 changed files with 11 additions and 8 deletions

View File

@ -17,13 +17,13 @@ repos:
hooks:
- id: black
name: Formatting (black)
entry: black
entry: make format
language: system
types: [python]
stages: [commit]
- id: ruff
name: Linter (ruff)
entry: ruff
entry: make lint
language: system
types: [python]
stages: [commit]
@ -40,4 +40,4 @@ repos:
pass_filenames: false
language: system
types: [python]
stages: [push]
stages: [push]

View File

@ -12,20 +12,23 @@ test-coverage:
PYTHONPATH=. poetry run pytest tests --cov private_gpt --cov-report term --cov-report=html --cov-report xml --junit-xml=tests-results.xml
black:
poetry run black . --check
PYTHONPATH=. poetry run black . --check
ruff:
poetry run ruff check private_gpt tests
PYTHONPATH=. poetry run ruff check private_gpt tests
format:
poetry run black .
poetry run ruff check private_gpt tests --fix
PYTHONPATH=. poetry run black .
lint:
PYTHONPATH=. poetry run ruff check private_gpt tests --fix
mypy:
poetry run mypy private_gpt
PYTHONPATH=. poetry run mypy private_gpt
check:
make format
make lint
make mypy
########################################################################################################################