main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,5 +1,5 @@
# sql/annotation.py
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
@@ -67,14 +67,16 @@ class SupportsAnnotations(ExternallyTraversible):
self,
values: Literal[None] = ...,
clone: bool = ...,
) -> Self: ...
) -> Self:
...
@overload
def _deannotate(
self,
values: Sequence[str] = ...,
clone: bool = ...,
) -> SupportsAnnotations: ...
) -> SupportsAnnotations:
...
def _deannotate(
self,
@@ -97,11 +99,9 @@ class SupportsAnnotations(ExternallyTraversible):
tuple(
(
key,
(
value._gen_cache_key(anon_map, [])
if isinstance(value, HasCacheKey)
else value
),
value._gen_cache_key(anon_map, [])
if isinstance(value, HasCacheKey)
else value,
)
for key, value in [
(key, self._annotations[key])
@@ -119,7 +119,8 @@ class SupportsWrappingAnnotations(SupportsAnnotations):
if TYPE_CHECKING:
@util.ro_non_memoized_property
def entity_namespace(self) -> _EntityNamespace: ...
def entity_namespace(self) -> _EntityNamespace:
...
def _annotate(self, values: _AnnotationDict) -> Self:
"""return a copy of this ClauseElement with annotations
@@ -140,14 +141,16 @@ class SupportsWrappingAnnotations(SupportsAnnotations):
self,
values: Literal[None] = ...,
clone: bool = ...,
) -> Self: ...
) -> Self:
...
@overload
def _deannotate(
self,
values: Sequence[str] = ...,
clone: bool = ...,
) -> SupportsAnnotations: ...
) -> SupportsAnnotations:
...
def _deannotate(
self,
@@ -211,14 +214,16 @@ class SupportsCloneAnnotations(SupportsWrappingAnnotations):
self,
values: Literal[None] = ...,
clone: bool = ...,
) -> Self: ...
) -> Self:
...
@overload
def _deannotate(
self,
values: Sequence[str] = ...,
clone: bool = ...,
) -> SupportsAnnotations: ...
) -> SupportsAnnotations:
...
def _deannotate(
self,
@@ -311,14 +316,16 @@ class Annotated(SupportsAnnotations):
self,
values: Literal[None] = ...,
clone: bool = ...,
) -> Self: ...
) -> Self:
...
@overload
def _deannotate(
self,
values: Sequence[str] = ...,
clone: bool = ...,
) -> Annotated: ...
) -> Annotated:
...
def _deannotate(
self,
@@ -388,9 +395,9 @@ class Annotated(SupportsAnnotations):
# so that the resulting objects are pickleable; additionally, other
# decisions can be made up front about the type of object being annotated
# just once per class rather than per-instance.
annotated_classes: Dict[Type[SupportsWrappingAnnotations], Type[Annotated]] = (
{}
)
annotated_classes: Dict[
Type[SupportsWrappingAnnotations], Type[Annotated]
] = {}
_SA = TypeVar("_SA", bound="SupportsAnnotations")
@@ -480,13 +487,15 @@ def _deep_annotate(
@overload
def _deep_deannotate(
element: Literal[None], values: Optional[Sequence[str]] = None
) -> Literal[None]: ...
) -> Literal[None]:
...
@overload
def _deep_deannotate(
element: _SA, values: Optional[Sequence[str]] = None
) -> _SA: ...
) -> _SA:
...
def _deep_deannotate(