diff options
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r-- | lib/sqlalchemy/orm/__init__.py | 8 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/_orm_constructors.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/clsregistry.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/collections.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/context.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/dependency.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/dynamic.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/evaluator.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/exc.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/instrumentation.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/loading.py | 3 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/persistence.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/session.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/strategies.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/sync.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/unitofwork.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/util.py | 1 |
20 files changed, 33 insertions, 6 deletions
diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py index 141702ae6..58900ab99 100644 --- a/lib/sqlalchemy/orm/__init__.py +++ b/lib/sqlalchemy/orm/__init__.py @@ -15,6 +15,8 @@ documentation for an overview of how this module is used. from __future__ import annotations +from typing import Any + from . import exc as exc from . import mapper as mapperlib from . import strategy_options as strategy_options @@ -31,7 +33,6 @@ from ._orm_constructors import deferred as deferred from ._orm_constructors import dynamic_loader as dynamic_loader from ._orm_constructors import join as join from ._orm_constructors import mapped_column as mapped_column -from ._orm_constructors import MappedColumn as MappedColumn from ._orm_constructors import outerjoin as outerjoin from ._orm_constructors import query_expression as query_expression from ._orm_constructors import relationship as relationship @@ -48,6 +49,7 @@ from .base import InspectionAttrExtensionType as InspectionAttrExtensionType from .base import Mapped as Mapped from .base import NotExtension as NotExtension from .base import ORMDescriptor as ORMDescriptor +from .context import FromStatement as FromStatement from .context import QueryContext as QueryContext from .decl_api import add_mapped_attribute as add_mapped_attribute from .decl_api import as_declarative as as_declarative @@ -89,8 +91,8 @@ from .mapper import Mapper as Mapper from .mapper import reconstructor as reconstructor from .mapper import validates as validates from .properties import ColumnProperty as ColumnProperty +from .properties import MappedColumn as MappedColumn from .query import AliasOption as AliasOption -from .query import FromStatement as FromStatement from .query import Query as Query from .relationships import foreign as foreign from .relationships import Relationship as Relationship @@ -133,7 +135,7 @@ from .util import with_parent as with_parent from .. import util as _sa_util -def __go(lcls): +def __go(lcls: Any) -> None: _sa_util.preloaded.import_prefix("sqlalchemy.orm") _sa_util.preloaded.import_prefix("sqlalchemy.ext") diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py index 2915710e4..560db9817 100644 --- a/lib/sqlalchemy/orm/_orm_constructors.py +++ b/lib/sqlalchemy/orm/_orm_constructors.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: allow-untyped-defs, allow-untyped-calls from __future__ import annotations diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 619af6510..9a6e94e22 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors """Defines instrumentation for class attributes and their interaction with instances. @@ -80,7 +81,6 @@ if TYPE_CHECKING: from .state import InstanceState from ..sql.dml import _DMLColumnElement from ..sql.elements import ColumnElement - from ..sql.elements import SQLCoreOperations _T = TypeVar("_T") diff --git a/lib/sqlalchemy/orm/clsregistry.py b/lib/sqlalchemy/orm/clsregistry.py index fe6dbfdc9..473468c6c 100644 --- a/lib/sqlalchemy/orm/clsregistry.py +++ b/lib/sqlalchemy/orm/clsregistry.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """Routines to handle the string class registry used by declarative. This system allows specification of classes and expressions used in diff --git a/lib/sqlalchemy/orm/collections.py b/lib/sqlalchemy/orm/collections.py index b1854de5a..717f1d0d6 100644 --- a/lib/sqlalchemy/orm/collections.py +++ b/lib/sqlalchemy/orm/collections.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors """Support for collections of mapped entities. diff --git a/lib/sqlalchemy/orm/context.py b/lib/sqlalchemy/orm/context.py index 05287cbcf..7a263daf8 100644 --- a/lib/sqlalchemy/orm/context.py +++ b/lib/sqlalchemy/orm/context.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors from __future__ import annotations @@ -67,7 +68,6 @@ if TYPE_CHECKING: from ._typing import _InternalEntityType from .mapper import Mapper from .query import Query - from ..sql.compiler import _CompilerStackEntry from ..sql.dml import _DMLTableElement from ..sql.elements import ColumnElement from ..sql.selectable import _LabelConventionCallable diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index d05d27b0e..96c146b3e 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """Relationship dependencies. diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py index a3b02bb94..63a37d0da 100644 --- a/lib/sqlalchemy/orm/dynamic.py +++ b/lib/sqlalchemy/orm/dynamic.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """Dynamic collection API. diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py index 1b3340dc5..72936d1ab 100644 --- a/lib/sqlalchemy/orm/evaluator.py +++ b/lib/sqlalchemy/orm/evaluator.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + from __future__ import annotations diff --git a/lib/sqlalchemy/orm/exc.py b/lib/sqlalchemy/orm/exc.py index 529a7cd01..f157919ab 100644 --- a/lib/sqlalchemy/orm/exc.py +++ b/lib/sqlalchemy/orm/exc.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors """SQLAlchemy ORM exceptions.""" diff --git a/lib/sqlalchemy/orm/instrumentation.py b/lib/sqlalchemy/orm/instrumentation.py index 88ceacd07..356958562 100644 --- a/lib/sqlalchemy/orm/instrumentation.py +++ b/lib/sqlalchemy/orm/instrumentation.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors """Defines SQLAlchemy's system of class instrumentation. diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 6a5690be2..3e21b0102 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: allow-untyped-defs, allow-untyped-calls """ diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py index d9949eb7a..61966d692 100644 --- a/lib/sqlalchemy/orm/loading.py +++ b/lib/sqlalchemy/orm/loading.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """private module containing functions used to convert database rows into object instances and associated state. @@ -59,7 +61,6 @@ if TYPE_CHECKING: from .state import InstanceState from ..engine.interfaces import _ExecuteOptions from ..sql import Select - from ..sql.base import Executable from ..sql.selectable import ForUpdateArg _T = TypeVar("_T", bound=Any) diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 083035093..c83ed7c15 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: allow-untyped-defs, allow-untyped-calls """Logic to map Python classes to and from selectables. diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index d41c4ebb8..56e7cca1a 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """private module containing functions used to emit INSERT, UPDATE and DELETE statements on behalf of a :class:`_orm.Mapper` and its descending diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 263d56101..736b140cd 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php + """Provides the Session class and related utilities.""" from __future__ import annotations diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index 2d85ba7f6..0ba22e7a7 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related MapperOptions.""" diff --git a/lib/sqlalchemy/orm/sync.py b/lib/sqlalchemy/orm/sync.py index a49bd6f8e..4f63e241b 100644 --- a/lib/sqlalchemy/orm/sync.py +++ b/lib/sqlalchemy/orm/sync.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """private module containing functions used for copying data between instances based on join conditions. diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py index 9ff284e73..c83ffdb59 100644 --- a/lib/sqlalchemy/orm/unitofwork.py +++ b/lib/sqlalchemy/orm/unitofwork.py @@ -4,6 +4,8 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: ignore-errors + """The internals for the unit of work system. diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index 8148793b1..7e8a6b4c6 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -4,6 +4,7 @@ # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php +# mypy: allow-untyped-defs, allow-untyped-calls from __future__ import annotations |