Skip to content

Commit 936bbb7

Browse files
committed
add docstring requirement
1 parent 9b9e11a commit 936bbb7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ test = [
4545
"setuptools",
4646
"pytest-xdist",
4747
"ruff",
48+
"pylint",
4849
]
4950

5051
pari = [
@@ -62,10 +63,12 @@ before-test = [
6263
'mkdir "{project}/temp"',
6364
'mv "{project}/quadint" "{project}/temp/quadint"', # Move the .py files away so they are not used in testing
6465
]
65-
test-requires=["pytest", "pytest-xdist"]
66+
test-requires=["pytest", "pytest-xdist", "pylint"]
6667
test-command=[
6768
"python -m pytest -n auto {project}/tests",
6869

70+
# Require docstrings on all unit tests!
71+
'python -m pylint {project}/tests --disable=all --enable=C0115,C0116 --no-docstring-rgx="^(?!(test_|Test)).*"',
6972
'mv "{project}/temp/quadint" "{project}/quadint"', # Move the .py files back so they are ready for the next build
7073
'rm -rf "{project}/temp"',
7174
]

0 commit comments

Comments
 (0)