From: Maksim Latysh Date: Mon, 2 Jan 2023 16:01:18 +0000 (+0100) Subject: Fixed rest mypy errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=421977686f17ce1f8fa22f36e39c29f738ed93bb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fixed rest mypy errors --- 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: