Skip to content

Commit 5fbff02

Browse files
committed
Activate the plugin with --mypy-config-file
1 parent d4bae65 commit 5fbff02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pytest_mypy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ def pytest_configure_node(self, node): # xdist hook
108108
def pytest_collect_file(path, parent):
109109
"""Create a MypyFileItem for every file mypy should run on."""
110110
if path.ext in {".py", ".pyi"} and any(
111-
[parent.config.option.mypy, parent.config.option.mypy_ignore_missing_imports],
111+
[
112+
parent.config.option.mypy,
113+
parent.config.option.mypy_config_file,
114+
parent.config.option.mypy_ignore_missing_imports,
115+
],
112116
):
113117
# Do not create MypyFile instance for a .py file if a
114118
# .pyi file with the same name already exists;

0 commit comments

Comments
 (0)