mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add IO protocols to _typeshed (#4230)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, NoReturn, Optional, Protocol, Text, Tuple, Type, Union
|
||||
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, NoReturn, Optional, Text, Tuple, Type, Union
|
||||
from types import FunctionType, MethodType, ModuleType, TracebackType
|
||||
from _typeshed import SupportsWrite
|
||||
if sys.version_info >= (3,):
|
||||
from reprlib import Repr
|
||||
else:
|
||||
@@ -133,12 +134,10 @@ text: TextDoc
|
||||
html: HTMLDoc
|
||||
|
||||
class _OldStyleClass: ...
|
||||
class _Writable(Protocol):
|
||||
def write(self, __obj: str) -> Any: ...
|
||||
|
||||
def resolve(thing: Union[str, object], forceload: bool = ...) -> Optional[Tuple[object, str]]: ...
|
||||
def render_doc(thing: Union[str, object], title: str = ..., forceload: bool = ..., renderer: Optional[Doc] = ...) -> str: ...
|
||||
def doc(thing: Union[str, object], title: str = ..., forceload: bool = ..., output: Optional[_Writable] = ...) -> None: ...
|
||||
def doc(thing: Union[str, object], title: str = ..., forceload: bool = ..., output: Optional[SupportsWrite[str]] = ...) -> None: ...
|
||||
def writedoc(thing: Union[str, object], forceload: bool = ...) -> None: ...
|
||||
def writedocs(dir: str, pkgpath: str = ..., done: Optional[Any] = ...) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user