We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b986572 commit fcefbb9Copy full SHA for fcefbb9
1 file changed
src/pytest_mypy.py
@@ -32,7 +32,12 @@ def pytest_addoption(parser):
32
action="store_true",
33
help="suppresses error messages about imports that cannot be resolved",
34
)
35
-
+ group.addoption(
36
+ "--mypy-config-file",
37
+ action="store",
38
+ type=str,
39
+ help="adds custom mypy config file",
40
+ )
41
42
XDIST_WORKERINPUT_ATTRIBUTE_NAMES = (
43
"workerinput",
@@ -95,7 +100,7 @@ def pytest_configure_node(self, node): # xdist hook
95
100
mypy_argv.append("--ignore-missing-imports")
96
101
97
102
if config.getoption("--mypy-config-file"):
98
- mypy_argv.append("--config-file")
103
+ mypy_argv.append("--config-file={}".format(config.getoption("--mypy-config-file")))
99
104
105
def pytest_collect_file(path, parent):
106
"""Create a MypyFileItem for every file mypy should run on."""
0 commit comments