File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ def pytest_addoption(parser):
39
39
help = "adds custom mypy config file" ,
40
40
)
41
41
42
+
42
43
XDIST_WORKERINPUT_ATTRIBUTE_NAMES = (
43
44
"workerinput" ,
44
45
# xdist < 2.0.0:
@@ -99,8 +100,10 @@ def pytest_configure_node(self, node): # xdist hook
99
100
if config .getoption ("--mypy-ignore-missing-imports" ):
100
101
mypy_argv .append ("--ignore-missing-imports" )
101
102
102
- if config .getoption ("--mypy-config-file" ):
103
- mypy_argv .append ("--config-file={}" .format (config .getoption ("--mypy-config-file" )))
103
+ mypy_config_file = config .getoption ("--mypy-config-file" )
104
+ if mypy_config_file :
105
+ mypy_argv .append ("--config-file={}" .format (mypy_config_file ))
106
+
104
107
105
108
def pytest_collect_file (path , parent ):
106
109
"""Create a MypyFileItem for every file mypy should run on."""
You can’t perform that action at this time.
0 commit comments