]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Removed other files changes except dynamic.py
authorMaksim Latysh <m.latysh@godeltech.com>
Fri, 30 Dec 2022 09:19:34 +0000 (10:19 +0100)
committerMaksim Latysh <m.latysh@godeltech.com>
Fri, 30 Dec 2022 09:19:34 +0000 (10:19 +0100)
lib/sqlalchemy/ext/asyncio/base.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/writeonly.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/langhelpers.py
lib/sqlalchemy/util/typing.py

index fce81601316af803f178d8c4244f1da659537906..13d5e40b24d3cf8283e4d692890ef867a748b98f 100644 (file)
@@ -178,7 +178,7 @@ class GeneratorStartableContext(StartableContext[_T_co]):
         if not is_ctxmanager:
             await self.gen.aclose()
 
-        return start_value  # type: ignore[no-any-return]
+        return start_value
 
     async def __aexit__(
         self, typ: Any, value: Any, traceback: Any
index 2cdff2cbca13ae3508caef0c18ee4799a1399d4a..5e6852cbf08c59be837ad0e53eb4db746f2f0a65 100644 (file)
@@ -62,7 +62,7 @@ from .base import opt_manager_of_class as opt_manager_of_class
 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
index b62964d50c2eb80bf2f04e3e8dc10b43d2b2baa6..5814cef65845b0b9adf14dafd12cae7c8fbcc6b5 100644 (file)
@@ -50,7 +50,6 @@ from ..sql import update
 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:
@@ -341,7 +340,7 @@ class WriteOnlyAttributeImpl(
         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:
@@ -445,7 +444,7 @@ class AbstractCollectionWriter(Generic[_T]):
     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
index 3d3ee31d65c8b3c9329faccb67f3406b08e9f12f..0f212fad52627ae4716e56d3046739209761f33f 100644 (file)
@@ -114,7 +114,7 @@ else:
 
 
 if py310:
-    anext_ = anext  # type: ignore[name-defined]
+    anext_ = anext
 else:
 
     _NOT_PROVIDED = object()
index b146905e20ae0c278262df2bc8d9834de980f7ba..8df4950a39aaa52004c1be82b0fc1bb6fefb60c9 100644 (file)
@@ -65,7 +65,7 @@ _HM = TypeVar("_HM", bound="hybridmethod[Any]")
 if compat.py310:
 
     def get_annotations(obj: Any) -> Mapping[str, Any]:
-        return inspect.get_annotations(obj)  # type: ignore
+        return inspect.get_annotations(obj)
 
 else:
 
index 873dfa863279a2e041e6bc2a77d0a3cacbd1e284..b1ef87db1719029e305e0e2770d6d0f8533e9004 100644 (file)
@@ -61,7 +61,7 @@ Self = TypeVar("Self", bound=Any)
 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