Skip to content

Commit b986572

Browse files
feat: ✨ allow pytest-mypy to pass mypy config file via flag
1 parent 3dc75df commit b986572

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pytest_mypy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def pytest_configure_node(self, node): # xdist hook
9494
if config.getoption("--mypy-ignore-missing-imports"):
9595
mypy_argv.append("--ignore-missing-imports")
9696

97+
if config.getoption("--mypy-config-file"):
98+
mypy_argv.append("--config-file")
9799

98100
def pytest_collect_file(path, parent):
99101
"""Create a MypyFileItem for every file mypy should run on."""

0 commit comments

Comments
 (0)