diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc10e87..7d4425f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] \ No newline at end of file + stages: [push] diff --git a/Makefile b/Makefile index 7b9a846..42d0f7c 100644 --- a/Makefile +++ b/Makefile @@ -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 ########################################################################################################################