Added a few missing type arguments for generic types used in stdlib stubs

I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2021-03-22 18:28:04 -07:00
committed by GitHub
parent a68fb50788
commit 0ec182227c
11 changed files with 15 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Patte
from xmlrpc.client import Fault
_Marshallable = Union[
None, bool, int, float, str, bytes, tuple, list, dict, datetime
None, bool, int, float, str, bytes, Tuple[Any, ...], List[Any], Dict[Any, Any], datetime
] # TODO: Recursive type on tuple, list, dict
# The dispatch accepts anywhere from 0 to N arguments, no easy way to allow this in mypy