Skip to content

Commit 285a0b0

Browse files
committed
verify missing safely
1 parent e978e37 commit 285a0b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/stubtest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,9 +1095,11 @@ def verify_funcitem(
10951095

10961096

10971097
@verify.register(Missing)
1098-
def verify_none(
1098+
def verify_missing(
10991099
stub: Missing, runtime: MaybeMissing[Any], object_path: list[str]
11001100
) -> Iterator[Error]:
1101+
if runtime is MISSING:
1102+
return
11011103
yield Error(object_path, "is not present in stub", stub, runtime)
11021104

11031105

0 commit comments

Comments
 (0)