from .base import PASSIVE_CLASS_MISMATCH # noqa
from .base import PASSIVE_NO_FETCH
from .base import PASSIVE_NO_FETCH_RELATED # noqa
-from .base import PASSIVE_NO_INITIALIZE as PASSIVE_NO_INITIALIZE
+from .base import PASSIVE_NO_INITIALIZE
from .base import PASSIVE_NO_RESULT
from .base import PASSIVE_OFF
from .base import PASSIVE_ONLY_PERSISTENT
from ..sql.dml import Delete
from ..sql.dml import Insert
from ..sql.dml import Update
-from ..util import symbol
from ..util.typing import Literal
if TYPE_CHECKING:
c = self._get_collection_history(state, passive)
return [(attributes.instance_state(x), x) for x in c.all_items]
- def _get_collection_history(self, state: InstanceState[_T], passive: PassiveFlag):
+ def _get_collection_history(self, state, passive):
if self.key in state.committed_state:
c = state.committed_state[self.key]
else:
if not TYPE_CHECKING:
__slots__ = ()
- def __init__(self, attr: WriteOnlyAttributeImpl, state: InstanceState[_T]) -> None:
+ def __init__(self, attr, state):
self.instance = instance = state.obj()
self.attr = attr
if compat.py310:
# why they took until py310 to put this in stdlib is beyond me,
# I've been wanting it since py27
- from types import NoneType as NoneType # type: ignore[attr-defined]
+ from types import NoneType as NoneType
else:
NoneType = type(None) # type: ignore