Skip to content

Commit 5c63cb8

Browse files
committed
Rename _is_master to _is_xdist_controller
1 parent 240cff7 commit 5c63cb8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/pytest_mypy.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ def _get_xdist_workerinput(config_node):
6060
return workerinput
6161

6262

63-
def _is_master(config):
63+
def _is_xdist_controller(config):
6464
"""
6565
True if the code running the given pytest.config object is running in
66-
an xdist master node or not running xdist at all.
66+
an xdist controller node or not running xdist at all.
6767
"""
6868
return _get_xdist_workerinput(config) is None
6969

@@ -74,7 +74,7 @@ def pytest_configure(config):
7474
register a custom marker for MypyItems,
7575
and configure the plugin based on the CLI.
7676
"""
77-
if _is_master(config):
77+
if _is_xdist_controller(config):
7878

7979
# Get the path to a temporary file and delete it.
8080
# The first MypyItem to run will see the file does not exist,
@@ -295,7 +295,7 @@ def from_session(cls, session) -> "MypyResults":
295295
"""Load (or generate) cached mypy results for a pytest session."""
296296
results_path = (
297297
session.config._mypy_results_path
298-
if _is_master(session.config)
298+
if _is_xdist_controller(session.config)
299299
else _get_xdist_workerinput(session.config)["_mypy_results_path"]
300300
)
301301
with FileLock(results_path + ".lock"):
@@ -324,7 +324,7 @@ class MypyWarning(pytest.PytestWarning):
324324

325325
def pytest_terminal_summary(terminalreporter, config):
326326
"""Report stderr and unrecognized lines from stdout."""
327-
if not _is_master(config):
327+
if not _is_xdist_controller(config):
328328
# This isn't hit in pytest 5.0 for some reason.
329329
return # pragma: no cover
330330
try:

0 commit comments

Comments
 (0)