summaryrefslogtreecommitdiff
path: root/src/_pytest/monkeypatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/_pytest/monkeypatch.py')
-rw-r--r--src/_pytest/monkeypatch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/monkeypatch.py b/src/_pytest/monkeypatch.py
index ffef87173..2c4320656 100644
--- a/src/_pytest/monkeypatch.py
+++ b/src/_pytest/monkeypatch.py
@@ -91,7 +91,7 @@ def annotated_getattr(obj: object, name: str, ann: str) -> object:
def derive_importpath(import_path: str, raising: bool) -> Tuple[str, object]:
- if not isinstance(import_path, str) or "." not in import_path: # type: ignore[unreachable]
+ if not isinstance(import_path, str) or "." not in import_path:
raise TypeError(f"must be absolute import path string, not {import_path!r}")
module, attr = import_path.rsplit(".", 1)
target = resolve(module)