mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
committed by
Sebastian Rittau
parent
172b384e23
commit
9c3978e337
3
third_party/2and3/yaml/__init__.pyi
vendored
3
third_party/2and3/yaml/__init__.pyi
vendored
@@ -6,8 +6,7 @@ from yaml.nodes import * # noqa: F403
|
||||
from yaml.loader import * # noqa: F403
|
||||
from yaml.dumper import * # noqa: F403
|
||||
from . import resolver # Help mypy a bit; this is implied by loader and dumper
|
||||
# TODO: stubs for cyaml?
|
||||
# from cyaml import *
|
||||
from .cyaml import *
|
||||
|
||||
__with_libyaml__ = ... # type: Any
|
||||
|
||||
|
||||
20
third_party/2and3/yaml/cyaml.pyi
vendored
Normal file
20
third_party/2and3/yaml/cyaml.pyi
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
from typing import Text, Union
|
||||
from typing_extensions import Protocol
|
||||
|
||||
from yaml.constructor import BaseConstructor, SafeConstructor
|
||||
from yaml.resolver import BaseResolver, Resolver
|
||||
|
||||
class _Readable(Protocol):
|
||||
def read(self, size: int) -> Union[Text, bytes]: ...
|
||||
|
||||
class CParser:
|
||||
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
|
||||
|
||||
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
|
||||
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
|
||||
|
||||
class CLoader(CParser, SafeConstructor, Resolver):
|
||||
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
|
||||
|
||||
class CSafeLoader(CParser, SafeConstructor, Resolver):
|
||||
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
|
||||
Reference in New Issue
Block a user