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):
3939 help = "adds custom mypy config file" ,
4040 )
4141
42+
4243XDIST_WORKERINPUT_ATTRIBUTE_NAMES = (
4344 "workerinput" ,
4445 # xdist < 2.0.0:
@@ -99,8 +100,10 @@ def pytest_configure_node(self, node): # xdist hook
99100 if config .getoption ("--mypy-ignore-missing-imports" ):
100101 mypy_argv .append ("--ignore-missing-imports" )
101102
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+
104107
105108def pytest_collect_file (path , parent ):
106109 """Create a MypyFileItem for every file mypy should run on."""
You can’t perform that action at this time.
0 commit comments