This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# orm/writeonly.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
|
||||
@@ -196,8 +196,7 @@ class WriteOnlyAttributeImpl(
|
||||
dict_: _InstanceDict,
|
||||
user_data: Literal[None] = ...,
|
||||
passive: Literal[PassiveFlag.PASSIVE_OFF] = ...,
|
||||
) -> CollectionAdapter:
|
||||
...
|
||||
) -> CollectionAdapter: ...
|
||||
|
||||
@overload
|
||||
def get_collection(
|
||||
@@ -206,8 +205,7 @@ class WriteOnlyAttributeImpl(
|
||||
dict_: _InstanceDict,
|
||||
user_data: _AdaptedCollectionProtocol = ...,
|
||||
passive: PassiveFlag = ...,
|
||||
) -> CollectionAdapter:
|
||||
...
|
||||
) -> CollectionAdapter: ...
|
||||
|
||||
@overload
|
||||
def get_collection(
|
||||
@@ -218,8 +216,7 @@ class WriteOnlyAttributeImpl(
|
||||
passive: PassiveFlag = ...,
|
||||
) -> Union[
|
||||
Literal[LoaderCallableStatus.PASSIVE_NO_RESULT], CollectionAdapter
|
||||
]:
|
||||
...
|
||||
]: ...
|
||||
|
||||
def get_collection(
|
||||
self,
|
||||
@@ -239,15 +236,11 @@ class WriteOnlyAttributeImpl(
|
||||
return DynamicCollectionAdapter(data) # type: ignore[return-value]
|
||||
|
||||
@util.memoized_property
|
||||
def _append_token( # type:ignore[override]
|
||||
self,
|
||||
) -> attributes.AttributeEventToken:
|
||||
def _append_token(self) -> attributes.AttributeEventToken:
|
||||
return attributes.AttributeEventToken(self, attributes.OP_APPEND)
|
||||
|
||||
@util.memoized_property
|
||||
def _remove_token( # type:ignore[override]
|
||||
self,
|
||||
) -> attributes.AttributeEventToken:
|
||||
def _remove_token(self) -> attributes.AttributeEventToken:
|
||||
return attributes.AttributeEventToken(self, attributes.OP_REMOVE)
|
||||
|
||||
def fire_append_event(
|
||||
|
||||
Reference in New Issue
Block a user