File tree 5 files changed +16
-6
lines changed
5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 47
47
- name : Install dependencies
48
48
run : pdm install -G lint --frozen-lockfile
49
49
- name : Lint with ruff
50
- run : |
51
- pdm run ruff check .
52
- pdm run ruff format --check .
50
+ run : pdm run lint-ruff
53
51
- name : Type check with mypy
54
52
run : pdm run mypy
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ RUN emerge -q dev-python/tox
10
10
11
11
WORKDIR /usr/src/gcm
12
12
COPY pyproject.toml README.md tox.ini ./
13
+ COPY scripts scripts
13
14
COPY src src
14
15
COPY tests tests
15
16
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ test = [
64
64
" pytest-env" ,
65
65
]
66
66
67
+ [tool .pdm .scripts ]
68
+ lint-ruff = " scripts/ruff"
69
+
67
70
[tool .ruff ]
68
71
line-length = 79
69
72
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -ex
4
+
5
+ ruff check src
6
+ ruff check tests \
7
+ --config ' lint.isort.known-first-party = ["gcm"]' \
8
+ --config ' lint.isort.known-local-folder = ["tests"]'
9
+ ruff format --check
Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ commands = pytest -v
15
15
[testenv:lint-ruff]
16
16
skip_install = true
17
17
deps = ruff
18
- commands =
19
- ruff check .
20
- ruff format --check .
18
+ allowlist_externals = scripts/ruff
19
+ commands = scripts/ruff
21
20
22
21
[testenv:lint-mypy]
23
22
package = editable
You can’t perform that action at this time.
0 commit comments