mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-25 01:38:40 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from typing import Any, Pattern, Union
|
||||
from typing import Any, Pattern
|
||||
|
||||
from yaml.error import MarkedYAMLError
|
||||
from yaml.nodes import ScalarNode
|
||||
|
||||
_Scalar = Union[str, int, float, bool, None]
|
||||
_Scalar = str | int | float | bool | None
|
||||
|
||||
class ConstructorError(MarkedYAMLError): ...
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import SupportsRead
|
||||
from collections.abc import Mapping, Sequence
|
||||
from typing import IO, Any, Union
|
||||
from typing import IO, Any
|
||||
|
||||
from ._yaml import CEmitter, CParser
|
||||
from .constructor import BaseConstructor, FullConstructor, SafeConstructor, UnsafeConstructor
|
||||
@@ -9,7 +9,7 @@ from .resolver import BaseResolver, Resolver
|
||||
|
||||
__all__ = ["CBaseLoader", "CSafeLoader", "CFullLoader", "CUnsafeLoader", "CLoader", "CBaseDumper", "CSafeDumper", "CDumper"]
|
||||
|
||||
_Readable = SupportsRead[Union[str, bytes]]
|
||||
_Readable = SupportsRead[str | bytes]
|
||||
|
||||
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user