mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 02:15:58 +08:00
Remove type annotation from some Loader args (#1695)
There were two problems AFAICT: - There are multiple Loader classes without a common base class, so this should really be a union or a protocol. - The argument is supposed to be a class, not an instance. Rather than figuring out a fix (which would probably require some nasty refactoring) I'm just going back to the old situation where these arguments are implicitly annotated with `Any`. See also https://github.com/python/typeshed/pull/1657#pullrequestreview-72049880
This commit is contained in:
4
third_party/2and3/yaml/__init__.pyi
vendored
4
third_party/2and3/yaml/__init__.pyi
vendored
@@ -14,8 +14,8 @@ def scan(stream, Loader=...): ...
|
||||
def parse(stream, Loader=...): ...
|
||||
def compose(stream, Loader=...): ...
|
||||
def compose_all(stream, Loader=...): ...
|
||||
def load(stream: Union[str, IO[str]], Loader: Loader=...) -> Any: ...
|
||||
def load_all(stream: Union[str, IO[str]], Loader: Loader=...) -> Iterator[Any]: ...
|
||||
def load(stream: Union[str, IO[str]], Loader=...) -> Any: ...
|
||||
def load_all(stream: Union[str, IO[str]], Loader=...) -> Iterator[Any]: ...
|
||||
def safe_load(stream: Union[str, IO[str]]) -> Any: ...
|
||||
def safe_load_all(stream: Union[str, IO[str]]) -> Iterator[Any]: ...
|
||||
def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ...
|
||||
|
||||
Reference in New Issue
Block a user