Skip to content

Commit 6576b7c

Browse files
committed
removed custom pre-commit script
1 parent 82515dc commit 6576b7c

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

.githooks/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
- id: gitleaks
4040

4141
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: 'v1.19.1'
42+
rev: "v1.19.1"
4343
hooks:
4444
- id: mypy
4545
exclude: sdk/
@@ -49,6 +49,6 @@ repos:
4949
- id: test
5050
name: Running tests
5151
language: system
52-
entry: "uv run pytest -rs --cov=amazon_paapi"
52+
entry: "bash -c 'set -a && source .env 2>/dev/null; set +a && uv run pytest -rs --cov=amazon_paapi'"
5353
types_or: [python]
5454
pass_filenames: false

Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@ export GID:=$(shell id -g)
44
export PYTHON_TAGS = 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15
55

66
setup:
7-
@git config --unset-all core.hooksPath || true
8-
@git config --local core.hooksPath .githooks
7+
@pre-commit install
98

10-
ensure-env:
9+
test:
1110
@touch .env
12-
13-
test: ensure-env
1411
@uv run --env-file .env pytest -rs
1512

16-
coverage: ensure-env
13+
coverage:
1714
@uv run pytest -rs --cov=amazon_paapi --cov-report=html --cov-report=term --cov-report=xml
1815

19-
test-all-python-tags: ensure-env
16+
test-all-python-tags:
17+
@touch .env
2018
@for tag in $$PYTHON_TAGS; do \
2119
uv run --env-file .env --python "$$tag" pytest -rs --no-cov; \
2220
done
@@ -27,5 +25,5 @@ lint:
2725
mypy:
2826
@uv run mypy .
2927

30-
pre-commit: ensure-env
31-
@uv run --env-file .env pre-commit run -a
28+
pre-commit:
29+
@pre-commit run -a

0 commit comments

Comments
 (0)