Skip to content

Commit

Permalink
Make verify first type a supertype of all dispatch types (#10727)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pranavrajpal authored Jun 28, 2021
1 parent 3dcccf2 commit 9851cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_module(module_name: str) -> Iterator[Error]:

@singledispatch
def verify(
stub: nodes.Node, runtime: MaybeMissing[Any], object_path: List[str]
stub: MaybeMissing[nodes.Node], runtime: MaybeMissing[Any], object_path: List[str]
) -> Iterator[Error]:
"""Entry point for comparing a stub to a runtime object.
Expand Down

0 comments on commit 9851cce

Please sign in to comment.