Skip to content

Commit e88a30d

Browse files
committed
Tox: Correctly handle non-stub packages without tests.
1 parent 589ca50 commit e88a30d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

repo_helper/files/testing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def get_mypy_commands(self) -> List[str]:
161161
commands.append("mypy tests")
162162
elif self["stubs_package"]:
163163
commands.append(f"stubtest {self['import_name']} {{posargs}}")
164-
elif self["enable_tests"]:
164+
else:
165165
commands.append(f"mypy {' '.join(self.get_source_files())} {{posargs}}")
166166

167167
return commands
@@ -314,7 +314,7 @@ def testenv_mypy(self):
314314
``[testenv:mypy]``.
315315
"""
316316

317-
if self["stubs_package"] or self["enable_tests"]:
317+
if not (self["stubs_package"] and not self["enable_tests"]):
318318
self._ini["testenv:mypy"]["basepython"] = "python{python_deploy_version}".format(**self._globals)
319319
self._ini["testenv:mypy"]["ignore_errors"] = True
320320
self._ini["testenv:mypy"]["changedir"] = "{toxinidir}"

0 commit comments

Comments
 (0)