Skip to content

Commit 2ac0f25

Browse files
abelcheungfrenzymadness
authored andcommitted
Run mypy in tox env and GH workflow
1 parent eea4803 commit 2ac0f25

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- py310
3131
- py311
3232
- py312
33+
- mypy
3334

3435
# Use GitHub's Linux Docker host
3536
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=61.0"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.mypy]
6+
packages = ['lxml_html_clean']

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
[tox]
2-
envlist = py36,py37,py38,py39,py310,py311,py312
2+
envlist = py36,py37,py38,py39,py310,py311,py312,mypy
33
skipsdist = True
44

55
[testenv]
66
commands =
77
python -m unittest tests.test_clean
88
python -m doctest tests/test_clean_embed.txt tests/test_clean.txt tests/test_autolink.txt
99
deps = lxml
10+
11+
[testenv:mypy]
12+
commands =
13+
mypy {posargs:}
14+
mypy {posargs:} tests/test_clean.py
15+
deps =
16+
mypy
17+
types-lxml >= 2023.3.28

0 commit comments

Comments
 (0)