Skip to content

Commit bcb8456

Browse files
authored
pip tweaks, add mypy to GHA (#220)
- pyproject.toml: move back `jinja2` to a base dependency. - pyproject.toml: extend `dev` group with `jinja2`. - GHA/checksrc: install packages via the `dev` group, drop `ci-tests`. - pyproject.toml: drop just added `ci-tests` optional dependency in favor of `dev` group. - GHA/checksrc: run `mypy`. - re-add `py.typed`. (It doesn't seem to make a different in local tests.) Follow-up to 09319b9 #219
1 parent 09319b9 commit bcb8456

File tree

5 files changed

+14
-21
lines changed

5 files changed

+14
-21
lines changed

.github/workflows/checksrc.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: 'install prereqs'
3535
run: |
3636
/home/linuxbrew/.linuxbrew/bin/brew install zizmor
37-
pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary '.[ci-tests]'
37+
pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary --group dev
3838
3939
- name: 'zizmor GHA'
4040
env:
@@ -48,3 +48,9 @@ jobs:
4848
ruff --version
4949
# shellcheck disable=SC2046
5050
ruff check $(git ls-files '*.py')
51+
52+
- name: 'mypy'
53+
run: |
54+
mypy --version
55+
# shellcheck disable=SC2046
56+
mypy $(git ls-files src | grep -E '\.py$')

.github/workflows/pages-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install dependencies
3232
run: |
33-
pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary '.[page-gen,browser-tests]'
33+
pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary '.[browser-tests]'
3434
python -m playwright install
3535
3636
- name: Install Playwright system dependencies

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
python-version: '3.12'
2727

2828
- name: Install dependencies
29-
run: pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary '.[page-gen]'
29+
run: pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary .
3030

3131
- name: Generate decoder HTML
3232
run: python -m curl_fuzzer_tools.generate_decoder_html

pyproject.toml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,15 @@ classifiers = [
2222
"Topic :: Software Development :: Testing",
2323
"Typing :: Typed",
2424
]
25-
26-
[project.optional-dependencies]
27-
ci-tests = [
28-
"ruff==0.14.2",
29-
]
30-
page-gen = [
31-
"scapy>=2.6.1,<3.0.0",
25+
dependencies = [
3226
"jinja2>=3.1.0,<4.0.0",
3327
]
28+
29+
[project.optional-dependencies]
3430
browser-tests = [
35-
"jinja2>=3.1.0,<4.0.0",
36-
"pytest>=8.3,<9",
3731
"playwright>=1.55,<1.56",
3832
"pytest_playwright>=0.7.1,<0.8",
33+
"pytest>=8.3,<9",
3934
]
4035
python-tests = [
4136
"pytest>=8.3,<9",
@@ -58,19 +53,11 @@ build-backend = "setuptools.build_meta"
5853

5954
[dependency-groups]
6055
dev = [
56+
"jinja2>=3.1.0,<4.0.0",
6157
"mypy==1.18.2",
6258
"ruff==0.14.2",
6359
"scapy>=2.6.1,<3.0.0",
6460
]
65-
page-gen = [
66-
"jinja2>=3.1.0,<4.0.0",
67-
]
68-
browser-tests = [
69-
"jinja2>=3.1.0,<4.0.0",
70-
"pytest>=8.3,<9",
71-
"playwright>=1.55,<1.56",
72-
"pytest_playwright>=0.7.1,<0.8",
73-
]
7461

7562
[tool.mypy]
7663
warn_unused_configs = true

src/curl_fuzzer_tools/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)