Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,9 +1,9 @@
from typing import Any, AnyStr, Callable, Dict, Optional, Sequence, Type, TypeVar, Union
from typing import Any, AnyStr, Callable, Dict, Sequence, Type, TypeVar
def with_repr(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ...
def with_cmp(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ...
def with_init(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ...
def immutable(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ...
def with_repr(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
def with_cmp(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
def with_init(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
def immutable(attrs: Sequence[AnyStr | Attribute]) -> Callable[..., Any]: ...
def strip_leading_underscores(attribute_name: AnyStr) -> AnyStr: ...
NOTHING = Any
@@ -11,13 +11,13 @@ NOTHING = Any
_T = TypeVar("_T")
def attributes(
attrs: Sequence[Union[AnyStr, Attribute]],
attrs: Sequence[AnyStr | Attribute],
apply_with_cmp: bool = ...,
apply_with_init: bool = ...,
apply_with_repr: bool = ...,
apply_immutable: bool = ...,
store_attributes: Optional[Callable[[type, Attribute], Any]] = ...,
**kw: Optional[Dict[Any, Any]],
store_attributes: Callable[[type, Attribute], Any] | None = ...,
**kw: Dict[Any, Any] | None,
) -> Callable[[Type[_T]], Type[_T]]: ...
class Attribute:
@@ -29,7 +29,7 @@ class Attribute:
exclude_from_repr: bool = ...,
exclude_from_immutable: bool = ...,
default_value: Any = ...,
default_factory: Optional[Callable[[None], Any]] = ...,
instance_of: Optional[Any] = ...,
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = ...,
default_factory: Callable[[None], Any] | None = ...,
instance_of: Any | None = ...,
init_aliaser: Callable[[AnyStr], AnyStr] | None = ...,
) -> None: ...