mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Add methods to yaml.cyaml.CParser (#5963)
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, Mapping, Sequence, Text, Union
|
||||
from typing import IO, Any, Mapping, Optional, Sequence, Text, Union
|
||||
|
||||
from yaml.constructor import BaseConstructor, Constructor, SafeConstructor
|
||||
from yaml.events import Event
|
||||
from yaml.nodes import Node
|
||||
from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
|
||||
from yaml.resolver import BaseResolver, Resolver
|
||||
from yaml.serializer import Serializer
|
||||
from yaml.tokens import Token
|
||||
|
||||
_Readable = SupportsRead[Union[Text, bytes]]
|
||||
|
||||
class CParser:
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
def dispose(self) -> None: ...
|
||||
def get_token(self) -> Optional[Token]: ...
|
||||
def peek_token(self) -> Optional[Token]: ...
|
||||
def check_token(self, *choices) -> bool: ...
|
||||
def get_event(self) -> Optional[Event]: ...
|
||||
def peek_event(self) -> Optional[Event]: ...
|
||||
def check_event(self, *choices) -> bool: ...
|
||||
def check_node(self) -> bool: ...
|
||||
def get_node(self) -> Optional[Node]: ...
|
||||
def get_single_node(self) -> Optional[Node]: ...
|
||||
|
||||
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user