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