mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 00:58:28 +08:00
Manual changes of Any union to Incomplete in stubs folder (#9566)
- ClassVar[Any | None] - Missed previous changes due to alias - Manual review of leftover Any unions (`| Any` and `Any |`)
This commit is contained in:
@@ -2,6 +2,9 @@ from typing import Any, ClassVar
|
||||
|
||||
from yaml.error import Mark
|
||||
|
||||
# Any Unions: Avoid forcing the user to check for None when they know what Node was instantiated with
|
||||
# Using generics may be overkill without support for default Generics
|
||||
# Permissive Unions could also be useful here.
|
||||
class Node:
|
||||
tag: str
|
||||
value: Any
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from _typeshed import SupportsItems
|
||||
from _typeshed import Incomplete, SupportsItems
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from types import BuiltinFunctionType, FunctionType, ModuleType
|
||||
from typing import Any, ClassVar, NoReturn, TypeVar
|
||||
@@ -15,12 +15,12 @@ class RepresenterError(YAMLError): ...
|
||||
class BaseRepresenter:
|
||||
yaml_representers: ClassVar[dict[type[Any], Callable[[BaseRepresenter, Any], Node]]]
|
||||
yaml_multi_representers: ClassVar[dict[type[Any], Callable[[BaseRepresenter, Any], Node]]]
|
||||
default_style: str | Any
|
||||
default_style: str | Incomplete
|
||||
sort_keys: bool
|
||||
default_flow_style: bool
|
||||
represented_objects: dict[int, Node]
|
||||
object_keeper: list[Any]
|
||||
alias_key: int | Any
|
||||
alias_key: int | Incomplete
|
||||
def __init__(self, default_style: str | None = ..., default_flow_style: bool = ..., sort_keys: bool = ...) -> None: ...
|
||||
def represent(self, data) -> None: ...
|
||||
def represent_data(self, data) -> Node: ...
|
||||
|
||||
Reference in New Issue
Block a user