Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9851cce

Browse files
authored
Make verify first type a supertype of all dispatch types (#10727)
Change the type of the first argument of verify (the type that singledispatch is dispatching on) to be a supertype of the dispatch types of all registered implementations, including the implementation for Missing.
1 parent 3dcccf2 commit 9851cce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_module(module_name: str) -> Iterator[Error]:
172172

173173
@singledispatch
174174
def verify(
175-
stub: nodes.Node, runtime: MaybeMissing[Any], object_path: List[str]
175+
stub: MaybeMissing[nodes.Node], runtime: MaybeMissing[Any], object_path: List[str]
176176
) -> Iterator[Error]:
177177
"""Entry point for comparing a stub to a runtime object.
178178

0 commit comments

Comments
 (0)