mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-21 10:32:08 +08:00
yaml.cyaml: Switch Optional to new pipe-based union (#5971)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, Mapping, Optional, Sequence, Text, Union
|
||||
from typing import IO, Any, Mapping, Sequence, Text, Union
|
||||
|
||||
from yaml.constructor import BaseConstructor, Constructor, SafeConstructor
|
||||
from yaml.events import Event
|
||||
@@ -14,15 +14,15 @@ _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 get_token(self) -> Token | None: ...
|
||||
def peek_token(self) -> Token | None: ...
|
||||
def check_token(self, *choices) -> bool: ...
|
||||
def get_event(self) -> Optional[Event]: ...
|
||||
def peek_event(self) -> Optional[Event]: ...
|
||||
def get_event(self) -> Event | None: ...
|
||||
def peek_event(self) -> Event | None: ...
|
||||
def check_event(self, *choices) -> bool: ...
|
||||
def check_node(self) -> bool: ...
|
||||
def get_node(self) -> Optional[Node]: ...
|
||||
def get_single_node(self) -> Optional[Node]: ...
|
||||
def get_node(self) -> Node | None: ...
|
||||
def get_single_node(self) -> Node | None: ...
|
||||
|
||||
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user