From 421977686f17ce1f8fa22f36e39c29f738ed93bb Mon Sep 17 00:00:00 2001 From: Maksim Latysh Date: Mon, 2 Jan 2023 17:01:18 +0100 Subject: [PATCH] Fixed rest mypy errors --- lib/sqlalchemy/orm/dynamic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py index d6faee26eb..f8478be902 100644 --- a/lib/sqlalchemy/orm/dynamic.py +++ b/lib/sqlalchemy/orm/dynamic.py @@ -138,7 +138,7 @@ class AppenderMixin(AbstractCollectionWriter[_T]): Query.__init__( self, attr.target_mapper, None # type: ignore[arg-type] ) - super().__init__(attr, state) + super().__init__(attr, state) # type: ignore @property def session(self) -> Optional[Session]: @@ -175,7 +175,7 @@ class AppenderMixin(AbstractCollectionWriter[_T]): result.SimpleResultMetaData([self.attr.class_.__name__]), self.attr._get_collection_history( attributes.instance_state(self.instance), - attributes.PASSIVE_NO_INITIALIZE, + attributes.PASSIVE_NO_INITIALIZE, # type: ignore ).added_items, _source_supports_scalars=True, ).scalars() @@ -192,7 +192,7 @@ class AppenderMixin(AbstractCollectionWriter[_T]): if sess is None: return self.attr._get_collection_history( attributes.instance_state(self.instance), - attributes.PASSIVE_NO_INITIALIZE, + attributes.PASSIVE_NO_INITIALIZE, # type: ignore ).indexed(index) else: return self._generate(sess).__getitem__(index) @@ -203,7 +203,7 @@ class AppenderMixin(AbstractCollectionWriter[_T]): return len( self.attr._get_collection_history( attributes.instance_state(self.instance), - attributes.PASSIVE_NO_INITIALIZE, + attributes.PASSIVE_NO_INITIALIZE, # type: ignore ).added_items ) else: -- 2.47.3