mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
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:
@@ -13,7 +13,7 @@ class _SupportsTimeTuple(Protocol):
|
||||
def timetuple(self) -> time.struct_time: ...
|
||||
|
||||
_DateTimeComparable = Union[DateTime, datetime, str, _SupportsTimeTuple]
|
||||
_Marshallable = Union[None, bool, int, float, str, bytes, tuple, list, dict, datetime, DateTime, Binary]
|
||||
_Marshallable = Union[None, bool, int, float, str, bytes, Tuple[Any, ...], List[Any], Dict[Any, Any], datetime, DateTime, Binary]
|
||||
_XMLDate = Union[int, datetime, Tuple[int, ...], time.struct_time]
|
||||
_HostType = Union[Tuple[str, Dict[str, str]], str]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user