API refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-07 16:25:52 +09:00
parent 76d0d86211
commit 91c7e04474
1171 changed files with 81940 additions and 44117 deletions

View File

@@ -1,5 +1,5 @@
# sql/traversals.py
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
@@ -80,16 +80,13 @@ class HasShallowCopy(HasTraverseInternals):
if typing.TYPE_CHECKING:
def _generated_shallow_copy_traversal(self, other: Self) -> None:
...
def _generated_shallow_copy_traversal(self, other: Self) -> None: ...
def _generated_shallow_from_dict_traversal(
self, d: Dict[str, Any]
) -> None:
...
) -> None: ...
def _generated_shallow_to_dict_traversal(self) -> Dict[str, Any]:
...
def _generated_shallow_to_dict_traversal(self) -> Dict[str, Any]: ...
@classmethod
def _generate_shallow_copy(
@@ -312,9 +309,11 @@ class _CopyInternalsTraversal(HasTraversalDispatch):
# sequence of 2-tuples
return [
(
clone(key, **kw)
if hasattr(key, "__clause_element__")
else key,
(
clone(key, **kw)
if hasattr(key, "__clause_element__")
else key
),
clone(value, **kw),
)
for key, value in element
@@ -336,9 +335,11 @@ class _CopyInternalsTraversal(HasTraversalDispatch):
def copy(elem):
if isinstance(elem, (list, tuple)):
return [
clone(value, **kw)
if hasattr(value, "__clause_element__")
else value
(
clone(value, **kw)
if hasattr(value, "__clause_element__")
else value
)
for value in elem
]
elif isinstance(elem, dict):
@@ -561,6 +562,8 @@ class TraversalComparatorStrategy(HasTraversalDispatch, util.MemoizedSlots):
return False
else:
continue
elif right_child is None:
return False
comparison = dispatch(
left_attrname, left, left_child, right, right_child, **kw