Skip to content

Commit 506d914

Browse files
committed
Replace MypyItem.MARKER with item_marker
1 parent 139ca47 commit 506d914

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/pytest_mypy/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def serialized(self) -> str:
4848
return str(self.mypy_results_path)
4949

5050

51+
item_marker = "mypy"
5152
mypy_argv: List[str] = []
5253
nodeid_name = "mypy"
5354
stash_key = {
@@ -153,7 +154,7 @@ def pytest_configure(config: pytest.Config) -> None:
153154

154155
config.addinivalue_line(
155156
"markers",
156-
f"{MypyItem.MARKER}: mark tests to be checked by mypy.",
157+
f"{item_marker}: mark tests to be checked by mypy.",
157158
)
158159
if config.getoption("--mypy-ignore-missing-imports"):
159160
mypy_argv.append("--ignore-missing-imports")
@@ -206,11 +207,9 @@ def collect(self) -> Iterator[MypyItem]:
206207
class MypyItem(pytest.Item):
207208
"""A Mypy-related test Item."""
208209

209-
MARKER = "mypy"
210-
211210
def __init__(self, *args: Any, **kwargs: Any):
212211
super().__init__(*args, **kwargs)
213-
self.add_marker(self.MARKER)
212+
self.add_marker(item_marker)
214213

215214
def repr_failure(
216215
self,

0 commit comments

Comments
 (0)