Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdcba3f

Browse files
committed
👷 Run pyright as part of tox
and not as separate CI job
1 parent 9a52460 commit bdcba3f

3 files changed

Lines changed: 8 additions & 20 deletions

File tree

.github/workflows/code_quality.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
toxenv:
2020
- ruff
2121
- docs
22+
- type-checking
2223
steps:
2324
- uses: actions/checkout@v4
2425
- uses: actions/setup-python@v5
@@ -40,23 +41,3 @@ jobs:
4041
python-version: '3.12'
4142
- name: Check environment variables
4243
run: python bin/check_envvar_usage.py
43-
44-
type-checking:
45-
name: Type checking (Pyright)
46-
runs-on: ubuntu-latest
47-
48-
steps:
49-
- uses: actions/checkout@v6
50-
- uses: actions/setup-python@v6
51-
with:
52-
python-version: '3.12'
53-
- name: Install additional dependencies
54-
run: |
55-
pip install uv
56-
uv pip install \
57-
--system \
58-
-e .[type-checking,tests,cors,csp,structlog]
59-
- uses: jakebailey/pyright-action@v1
60-
with:
61-
version: 1.1.407
62-
project: pyright.pyproject.toml

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ tests = [
6464
"django-webtest"
6565
]
6666
type-checking = [
67+
"pyright",
6768
"decouple-types",
6869
"django-stubs",
6970
"django-stubs-ext",

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ envlist =
33
py{312, 313}-django{52}-{extras,noextras}
44
ruff
55
docs
6+
type-checking
67
skip_missing_interpreters = true
78

89
[gh-actions]
@@ -54,3 +55,8 @@ allowlist_externals = make
5455
commands=
5556
make SPHINXOPTS="-W" html
5657
make linkcheck
58+
59+
[testenv:type-checking]
60+
deps = .[type-checking,tests,cors,csp,structlog]
61+
skipsdist = True
62+
commands = pyright --project pyright.pyproject.toml

0 commit comments

Comments
 (0)