]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
inline mypy config; files ignoring type errors for the moment
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 Apr 2022 19:43:02 +0000 (15:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Apr 2022 19:02:50 +0000 (15:02 -0400)
to simplify pyproject.toml change the remaining files
that aren't going to be typed on this first pass
(unless of course someone wants to type some of these)
to include # mypy: ignore-errors.   for the moment, only a handful
of ORM modules are to have more type checking implemented.

It's important that ignore-errors is used and
not "# type: ignore", as in the latter case, mypy doesn't even
read the existing types in the file, which makes it impossible to
type any files that refer to those modules at all.

to simplify ongoing typing work use inline mypy config
for remaining files that are "done" for now, indicating the
level of type checking they currently have.

Change-Id: I98669c1a305c2f0adba85d10b5425541f3fe9533

150 files changed:
lib/sqlalchemy/dialects/__init__.py
lib/sqlalchemy/dialects/mssql/__init__.py
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/information_schema.py
lib/sqlalchemy/dialects/mssql/json.py
lib/sqlalchemy/dialects/mssql/provision.py
lib/sqlalchemy/dialects/mssql/pymssql.py
lib/sqlalchemy/dialects/mssql/pyodbc.py
lib/sqlalchemy/dialects/mysql/__init__.py
lib/sqlalchemy/dialects/mysql/aiomysql.py
lib/sqlalchemy/dialects/mysql/asyncmy.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/cymysql.py
lib/sqlalchemy/dialects/mysql/dml.py
lib/sqlalchemy/dialects/mysql/enumerated.py
lib/sqlalchemy/dialects/mysql/expression.py
lib/sqlalchemy/dialects/mysql/json.py
lib/sqlalchemy/dialects/mysql/mariadb.py
lib/sqlalchemy/dialects/mysql/mariadbconnector.py
lib/sqlalchemy/dialects/mysql/mysqlconnector.py
lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/provision.py
lib/sqlalchemy/dialects/mysql/pymysql.py
lib/sqlalchemy/dialects/mysql/pyodbc.py
lib/sqlalchemy/dialects/mysql/reflection.py
lib/sqlalchemy/dialects/mysql/reserved_words.py
lib/sqlalchemy/dialects/mysql/types.py
lib/sqlalchemy/dialects/oracle/__init__.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/oracle/provision.py
lib/sqlalchemy/dialects/postgresql/__init__.py
lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
lib/sqlalchemy/dialects/postgresql/array.py
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/dml.py
lib/sqlalchemy/dialects/postgresql/ext.py
lib/sqlalchemy/dialects/postgresql/hstore.py
lib/sqlalchemy/dialects/postgresql/json.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/dialects/postgresql/provision.py
lib/sqlalchemy/dialects/postgresql/psycopg.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
lib/sqlalchemy/dialects/postgresql/ranges.py
lib/sqlalchemy/dialects/sqlite/__init__.py
lib/sqlalchemy/dialects/sqlite/aiosqlite.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/dialects/sqlite/dml.py
lib/sqlalchemy/dialects/sqlite/json.py
lib/sqlalchemy/dialects/sqlite/provision.py
lib/sqlalchemy/dialects/sqlite/pysqlcipher.py
lib/sqlalchemy/dialects/sqlite/pysqlite.py
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/ext/automap.py
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/ext/compiler.py
lib/sqlalchemy/ext/declarative/__init__.py
lib/sqlalchemy/ext/declarative/extensions.py
lib/sqlalchemy/ext/horizontal_shard.py
lib/sqlalchemy/ext/indexable.py
lib/sqlalchemy/ext/instrumentation.py
lib/sqlalchemy/ext/mutable.py
lib/sqlalchemy/ext/mypy/plugin.py
lib/sqlalchemy/ext/mypy/util.py
lib/sqlalchemy/ext/orderinglist.py
lib/sqlalchemy/ext/serializer.py
lib/sqlalchemy/future/__init__.py
lib/sqlalchemy/future/engine.py
lib/sqlalchemy/future/orm/__init__.py [deleted file]
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/_orm_constructors.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/clsregistry.py
lib/sqlalchemy/orm/collections.py
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/evaluator.py
lib/sqlalchemy/orm/exc.py
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/sync.py
lib/sqlalchemy/orm/unitofwork.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/crud.py
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/lambdas.py
lib/sqlalchemy/sql/naming.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/traversals.py
lib/sqlalchemy/sql/util.py
lib/sqlalchemy/testing/__init__.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/assertsql.py
lib/sqlalchemy/testing/asyncio.py
lib/sqlalchemy/testing/config.py
lib/sqlalchemy/testing/engines.py
lib/sqlalchemy/testing/entities.py
lib/sqlalchemy/testing/exclusions.py
lib/sqlalchemy/testing/fixtures.py
lib/sqlalchemy/testing/pickleable.py
lib/sqlalchemy/testing/plugin/bootstrap.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/plugin/pytestplugin.py
lib/sqlalchemy/testing/profiling.py
lib/sqlalchemy/testing/provision.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/schema.py
lib/sqlalchemy/testing/suite/test_cte.py
lib/sqlalchemy/testing/suite/test_ddl.py
lib/sqlalchemy/testing/suite/test_deprecations.py
lib/sqlalchemy/testing/suite/test_dialect.py
lib/sqlalchemy/testing/suite/test_insert.py
lib/sqlalchemy/testing/suite/test_reflection.py
lib/sqlalchemy/testing/suite/test_results.py
lib/sqlalchemy/testing/suite/test_rowcount.py
lib/sqlalchemy/testing/suite/test_select.py
lib/sqlalchemy/testing/suite/test_sequence.py
lib/sqlalchemy/testing/suite/test_types.py
lib/sqlalchemy/testing/suite/test_unicode_ddl.py
lib/sqlalchemy/testing/suite/test_update_delete.py
lib/sqlalchemy/testing/util.py
lib/sqlalchemy/testing/warnings.py
lib/sqlalchemy/util/_collections.py
lib/sqlalchemy/util/_concurrency_py3k.py
lib/sqlalchemy/util/_has_cy.py
lib/sqlalchemy/util/_py_collections.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/concurrency.py
lib/sqlalchemy/util/deprecations.py
lib/sqlalchemy/util/langhelpers.py
lib/sqlalchemy/util/preloaded.py
lib/sqlalchemy/util/queue.py
lib/sqlalchemy/util/topological.py
lib/sqlalchemy/util/typing.py
pyproject.toml

index 7f96ef628d91a094cfea46976ae718c9ea394331..a942ca0fcdd9fbdb9a2e88cf7636fff7eb571bab 100644 (file)
@@ -5,13 +5,22 @@
 # This module is part of SQLAlchemy and is released under
 # the MIT License: https://www.opensource.org/licenses/mit-license.php
 
-__all__ = ("mssql", "mysql", "oracle", "postgresql", "sqlite")
+from __future__ import annotations
 
+from typing import Callable
+from typing import Optional
+from typing import Type
+from typing import TYPE_CHECKING
 
 from .. import util
 
+if TYPE_CHECKING:
+    from ..engine.interfaces import Dialect
+
+__all__ = ("mssql", "mysql", "oracle", "postgresql", "sqlite")
+
 
-def _auto_fn(name):
+def _auto_fn(name: str) -> Optional[Callable[[], Type[Dialect]]]:
     """default dialect importer.
 
     plugs into the :class:`.PluginLoader`
@@ -33,7 +42,7 @@ def _auto_fn(name):
             module = __import__(
                 "sqlalchemy.dialects.mysql.mariadb"
             ).dialects.mysql.mariadb
-            return module.loader(driver)
+            return module.loader(driver)  # type: ignore
         else:
             module = __import__("sqlalchemy.dialects.%s" % (dialect,)).dialects
             module = getattr(module, dialect)
@@ -42,7 +51,7 @@ def _auto_fn(name):
 
     if hasattr(module, driver):
         module = getattr(module, driver)
-        return lambda: module.dialect
+        return lambda: module.dialect  # type: ignore
     else:
         return None
 
index be9b0f1ea10233de1772235a00219714ee8ceebc..bd0736fd7ee642163a9201d6282b952a7f717243 100644 (file)
@@ -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 . import base  # noqa
 from . import pymssql  # noqa
index 2bacaaf3338123822dce20a490c7b5da067eae9d..2e0238dcf993f1754a9d966429f98f236b2feb72 100644 (file)
@@ -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
+
 """
 .. dialect:: mssql
     :name: Microsoft SQL Server
@@ -854,7 +856,6 @@ from ...types import VARCHAR
 from ...util import update_wrapper
 
 if TYPE_CHECKING:
-    from ...sql.compiler import SQLCompiler
     from ...sql.dml import DMLState
     from ...sql.selectable import TableClause
 
index bb66adb586032056aa7fdf873b41e1510dd6ecbb..b7e560bf144357a1b4f7dba8fd58f6a120562f98 100644 (file)
@@ -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 ... import cast
 from ... import Column
index ae90597771cedccffe03cf1978c42f214dd5378c..815b5d2ff86f4e1713b73b007c8628ae5bca1c65 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from ... import types as sqltypes
 
 # technically, all the dialect-specific datatypes that don't have any special
index 56f3305a704105ebecaeec7e9b7a341da2b800a1..f307c714070eeb43794a8e600fd8cd1ebb6960bf 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from sqlalchemy import inspect
 from sqlalchemy import Integer
 from ... import create_engine
index 8d654b72dfce2ca998e05e31c3cfa99d6c0d9419..e211c146169671ea8557de45174b03a4832fc92a 100644 (file)
@@ -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
+
 
 """
 .. dialect:: mssql+pymssql
index f6c9afc49be3eaa55e36c6b655138938249494c7..28cca56f7ff3cc0af44696477726590962111e6c 100644 (file)
@@ -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
+
 r"""
 .. dialect:: mssql+pyodbc
     :name: PyODBC
index b61ee06731de262eec8af23944c22f00b8e9f1c1..7c9d42856af3bc814e951301b132888e32a8f983 100644 (file)
@@ -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 . import aiomysql  # noqa
 from . import asyncmy  # noqa
index d685b7ea10656e0b5bf4a035e85d5b53bad1da58..896c902272c5826ed1db9090c956bd57812f4e0c 100644 (file)
@@ -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
+
 r"""
 .. dialect:: mysql+aiomysql
     :name: aiomysql
index 7d5b1bf866d54c17b6cb1488d9202c3f53f34681..c8f29a2f12a09e02fe40696ec894b82e44e68563 100644 (file)
@@ -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
+
 r"""
 .. dialect:: mysql+asyncmy
     :name: asyncmy
index b53e55abf2533e73f8d624243cb7b435b7ae4e1f..62bdb953560b09844411edcd6816e058c80065dc 100644 (file)
@@ -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
+
 
 r"""
 
index 281c509b798d3995913339331593ba4df3680c58..4987b58b793caba2ba9608b7c20e9751edc66084 100644 (file)
@@ -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
+
 r"""
 
 .. dialect:: mysql+cymysql
index eb4a9f7980d662f6ecc7585c4421d9da9e585a5a..f5e4f03e9706cf6e29e3acc97e6902e99af4bf67 100644 (file)
@@ -3,6 +3,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
+
 
 import typing
 
index 753f591e9abe8d4acfad004eafac94816909a093..8dc96fb1549b59d6a0779eb8550d0bdcaaaa59f5 100644 (file)
@@ -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
+
 
 import re
 
index 8c9d66e2bade09737fa39bd6b6fcdeda2af96d0e..c8c69351740539b5e27364051ce99b59ef07ed1d 100644 (file)
@@ -3,6 +3,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
+
 
 import typing
 
index 5ea75339274bc6463d6879d39192367dbb93c769..7588dd23593595a0b1e17be461c3d10327c0e65a 100644 (file)
@@ -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 ... import types as sqltypes
 
 
index 568c3f0cf588923ee1daf307f2527223e0dc903b..05190dff4192cdb9fce0f80609ef3967108e1aad 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .base import MariaDBIdentifierPreparer
 from .base import MySQLDialect
 
index bf2b042513cf5b10a59fd6e9c26b4fda70181df1..6327d8687d01dce32531c32e0b2adf8dadd1e1a9 100644 (file)
@@ -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
+
 
 """
 
index a69dac9a5cdc13c92a83d85460643f29c18fc9cd..58e92c4ab772a127d8797f4f70b1cc442ca54afe 100644 (file)
@@ -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
+
 
 r"""
 .. dialect:: mysql+mysqlconnector
index 6d66f88b4f0fdd83c1dbe9411d4b992169a7fdbf..60b9cb1035cf0a1d7dc3633267ce40bb98feae22 100644 (file)
@@ -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
+
 
 """
 
index 86aaa94d94f2a41f4dfb1757d5ba0a159a568b90..c73875fec066ead5e203d97ddfc6fa3043e444e3 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from ... import exc
 from ...testing.provision import configure_follower
 from ...testing.provision import create_db
index 9a240da618435d32932c6db2de69998852683e8b..66d2f32420c7d68e17b7439fe32f4342e4911890 100644 (file)
@@ -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
+
 
 r"""
 
index aa2190bf46c3acc8bf4c6a4883e9025e1d184d57..28dafc5a01efae95d9c348bd9e05319a93a35252 100644 (file)
@@ -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
+
 
 r"""
 
index 81ac2c7c51f1fc82df1959c10a7ce5affc18ecea..2ce8473d0a584f959b1332363c83b50501a2d51c 100644 (file)
@@ -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
+
 
 import re
 
index 995168bbb09f47c76e6c25b64e465d9e9ccb764d..25d0c57f036a3899da36e4bb27d5c62e7f932ff7 100644 (file)
@@ -11,6 +11,8 @@
 # https://mariadb.com/kb/en/reserved-words/
 # includes: Reserved Words, Oracle Mode (separate set unioned)
 # excludes: Exceptions, Function Names
+# mypy: ignore-errors
+
 RESERVED_WORDS_MARIADB = {
     "accessible",
     "add",
index 95e85f602e4ea1675ae0dfcaef6112d733788983..a74fba1771631cf305d169632a142d0bb0c79fc9 100644 (file)
@@ -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
+
 
 import datetime
 
index 8994b4a108002b0da107253a5eb755f55435c461..6b9bbd53db63ccd06b135503ae846c19850817e9 100644 (file)
@@ -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 . import base  # noqa
 from . import cx_oracle  # noqa
index 7cd4603a846332701c330a88b5a8286467339046..cdc3716fd9b935f94d8d868545492e90c93b7cf3 100644 (file)
@@ -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
+
 
 r"""
 .. dialect:: oracle
index f8cdd50e4e4425b4289e03b11dfcf9a22d4840bb..c88feae1a73479ca23ae7ea142cd0dba1350f10a 100644 (file)
@@ -3,6 +3,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
+
 
 r"""
 .. dialect:: oracle+cx_oracle
index 74ad1f2a4b1223e0d7e19a8097c7c12bef3e5675..cba3b5be47bccb7bd187d2e47d940fe119804ecb 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from ... import create_engine
 from ... import exc
 from ...engine import url as sa_url
index b1fd2a34212939a8ee9d587879f29de64dae71ee..c2472fb5594de31c0b4838bf3ac6642896087fdf 100644 (file)
@@ -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 types import ModuleType
 
 from . import asyncpg  # noqa
index e7d5e77c393d890daf8a764d9d79000589881f32..6b8b3f6d02bfcef5dcdc313a5dfed2fc1bdc5f64 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import decimal
 
 from .array import ARRAY as PGARRAY
index 7eec7b86fb7c909901267c7d88f75d695e201f95..298485f40e739b3127e3403bd955432c4a215f4a 100644 (file)
@@ -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
 
index 75f6c2704b30ddb9151648b67a9348a92c363b5a..d320c323c1b5cea6d840a92ca614c82d855f373c 100644 (file)
@@ -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
+
 r"""
 .. dialect:: postgresql+asyncpg
     :name: asyncpg
index 5d1298cf7782a5486c1fe0be94548749f9e2743a..33563ac2ca54298170c9ed6f14e116d193c36c0e 100644 (file)
@@ -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
+
 
 r"""
 .. dialect:: postgresql
index 09dbd9558f5f857c83934e2209fa6e9bba186e48..b79b4a30ec03e25b0f000803a13817ac81a86eb8 100644 (file)
@@ -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
+
 import typing
 
 from . import ext
index 9257746b003f2048b75fb3e455a553af7885f82d..ef8c8f5290d776d3371a39961c1a044035cac4bb 100644 (file)
@@ -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 itertools import zip_longest
 
 from .array import ARRAY
index b5d38e0a4b15ad1ee3201fb9c9d13300f056bf81..43042b29f58f4b1ecea90645d94c54a7767eee58 100644 (file)
@@ -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
+
 
 import re
 
index 514f89f476bc9ec3f3b29d7d5f0a3a7606d9434b..8763a0ca20cda0e1fa1e47f187c0d722f70f6f8d 100644 (file)
@@ -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
+
 import collections.abc as collections_abc
 
 from ... import types as sqltypes
index 1ae649ef9e1e0c88e2f279b8745fc9c56ea04ab5..fbed3a464a7699d9b64164882f8423a027f2797a 100644 (file)
@@ -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
+
 r"""
 .. dialect:: postgresql+pg8000
     :name: pg8000
index 29926ee3daed93f08d7f7c4c00e9fa15e524ab99..0d17f28e032bc5a8946d35fdbdd4fae84f077bbb 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import time
 
 from ... import exc
index b811d1cabbc41c8a162db5be445a88d1c5cf49f1..634cea38a0d2c0a201b36e470d4463f5fc728509 100644 (file)
@@ -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
+
 r"""
 .. dialect:: postgresql+psycopg
     :name: psycopg (a.k.a. psycopg 3)
index c0dc54fabe75c480ac3fbf42c2e246828d569dbc..f7d1942a07433e92e93c0ee14633f7440f8046e3 100644 (file)
@@ -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
+
 r"""
 .. dialect:: postgresql+psycopg2
     :name: psycopg2
index 0943613a28025f87b4f5be0303f9b9c3fd5982ad..ba9ea09e5aae8ca72d89a3e6831ae488b827e733 100644 (file)
@@ -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
+
 r"""
 .. dialect:: postgresql+psycopg2cffi
     :name: psycopg2cffi
index 18c40a994eee48c5f18369ff92c9b9527f3ac245..b4d44fa9151c34bf0944026122de3493ad44e953 100644 (file)
@@ -3,6 +3,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 ... import types as sqltypes
 
index 50990c46e8fd4f15c4bb36dfdf067285c6878285..019751a96b84d299afd4c311727190e199e61eff 100644 (file)
@@ -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 . import aiosqlite  # noqa
 from . import base  # noqa
index dd0499975b7739fc9d4691fea7d97b1c2c7bfea4..a5a1ec065619bd6c9c8d2edaf793ab1fdbe56a36 100644 (file)
@@ -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
+
 
 r"""
 
index f21ab9083628cac7045c1e9bb8ff8644570b1dad..e2349295c8f0ef45a09edcff2441619ac95820bb 100644 (file)
@@ -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
+
 
 r"""
 .. dialect:: sqlite
index 7dee7e3b66c52834d69416f3a63e5d5298923130..9e9e68330f87e2d1e4a2ef34f36670be297341f5 100644 (file)
@@ -3,6 +3,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
+
 
 import typing
 
index b412fa5a52ed83f84d6a214ee2f04aa4a22b830c..69df3171c22ad3ab0667dfc248fc31a81cd099d8 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from ... import types as sqltypes
 
 
index e5b17e8294fd7c1d4b7b4dab9a8dabf2e175472a..a590f9f03efa6881263b31f90cb25431f48aaea2 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import os
 import re
 
index b67eed97495725f67c6c7fd241da0b3d7ea3a19b..53e4b0d1bfa5d03c26f71ba410c363e505e9b206 100644 (file)
@@ -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
+
 
 """
 .. dialect:: sqlite+pysqlcipher
index 2aa7149a6868029227833f9568383ef608ba82f0..f155fed36595f5c90b683cad150fbf650065bc75 100644 (file)
@@ -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
+
 
 r"""
 .. dialect:: sqlite+pysqlite
index ff69666b71066f0ecd32e8a04f308083a2976492..f4e22df2dbb94ddc7e16d85c05e02a4d1b4b717f 100644 (file)
@@ -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
 
 """Define cursor-specific result set constructs including
 :class:`.BaseCursorResult`, :class:`.CursorResult`."""
index 9c6ff758fc6c2e1879d206fbbbaeb1a62390a2b5..653b73a326bf55e81978926fc0c3f6d4babce3bf 100644 (file)
@@ -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
 
 """Default implementations of per-dialect sqlalchemy.engine classes.
 
index e0f532152f049941c23edc3f8751b666ecd68277..70d39218727273d5a609d20655c7c89a25f3aa0f 100644 (file)
@@ -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
 
 r"""Define an extension to the :mod:`sqlalchemy.ext.declarative` system
 which automatically generates mapped classes and relationships from a database
index 1786da68712d638b97f7ddb1eea1004e2ca2470a..7093de7325da4a3bcb3a0c902798efab0182a860 100644 (file)
@@ -4,6 +4,9 @@
 #
 # This module is part of SQLAlchemy and is released under
 # the MIT License: https://www.opensource.org/licenses/mit-license.php
+# mypy: ignore-errors
+
+
 """Baked query extension.
 
 Provides a creational pattern for the :class:`.query.Query` object which
index b74761fe4caa38a7281160633966efa7c811f222..3c228c0c4e049ab7dd882fa3f5a607735869529a 100644 (file)
@@ -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
 
 r"""Provides an API for creation of custom ClauseElements and compilers.
 
index d6d0f956a51d4df7a61c75ac715107b290054e71..042a54fc38ae675af0909f84a10dfda1349b6340 100644 (file)
@@ -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 .extensions import AbstractConcreteBase
 from .extensions import ConcreteBase
index 470ff6ad886e8f31216814ff5efbaae456625325..9faf2ed51fa169f6c6a8826d318b9351d3c5ba79 100644 (file)
@@ -4,6 +4,9 @@
 #
 # This module is part of SQLAlchemy and is released under
 # the MIT License: https://www.opensource.org/licenses/mit-license.php
+# mypy: ignore-errors
+
+
 """Public API functions and helpers for declarative."""
 
 
index 0be203988738e8985c8359a15c3fa716edce5ca7..5588fd5870a767fe3b55122debfa02a12d54e35b 100644 (file)
@@ -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
 
 """Horizontal sharding support.
 
index fa30ecd72f5a31e4422cde09ddb6696db502491a..5c5d2673649aaedaea9b0780782e8d6547ce1153 100644 (file)
@@ -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
 
 """Define attributes on ORM-mapped classes that have "index" attributes for
 columns with :class:`_types.Indexable` types.
index c14b466ebdc7e797cb7eb02046aa1a8aca605854..427e151dacc0b6d19077d07056ab7133e3173350 100644 (file)
@@ -1,3 +1,11 @@
+# ext/instrumentation.py
+# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
+# <see AUTHORS file>
+#
+# This module is part of SQLAlchemy and is released under
+# the MIT License: https://www.opensource.org/licenses/mit-license.php
+# mypy: ignore-errors
+
 """Extensible class instrumentation.
 
 The :mod:`sqlalchemy.ext.instrumentation` package provides for alternate
index 7f3aad8b0ca58e3261c686b49c1267e7b7349e73..ba7f9b0a41e3d794155c29f41300b7ba801ee344 100644 (file)
@@ -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
 
 r"""Provide support for tracking of in-place changes to scalar values,
 which are propagated into ORM change events on owning parent objects.
index f7e66e341997b53ab7e66be58c88040d0c3cdd37..0c536e3c902ef1f418c845f5c8df81b53e8f0d94 100644 (file)
@@ -1,5 +1,5 @@
 # ext/mypy/plugin.py
-# Copyright (C) 2021 the SQLAlchemy authors and contributors
+# Copyright (C) 2021-2022 the SQLAlchemy authors and contributors
 # <see AUTHORS file>
 #
 # This module is part of SQLAlchemy and is released under
index 7192675dfa86310970072a4781dbbd533a5e82ac..49fe5140f0ca4897ab5fac8a84eb707eb20c1be9 100644 (file)
@@ -1,3 +1,10 @@
+# ext/mypy/util.py
+# Copyright (C) 2021-2022 the SQLAlchemy authors and contributors
+# <see AUTHORS file>
+#
+# This module is part of SQLAlchemy and is released under
+# the MIT License: https://www.opensource.org/licenses/mit-license.php
+
 from __future__ import annotations
 
 import re
index 612b6272455c4f5dac761f40641c0fbe4fc52c3c..f08ffc68dcd7e78c17c2ccb6d663150dfee530aa 100644 (file)
@@ -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
 
 """A custom list that manages index/position information for contained
 elements.
index 0ea3a22193d2bbc5d8a0c14d5e52740f76a3a81e..276971eceadc784c4f717c0de117d020aafa01bf 100644 (file)
@@ -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
 
 """Serializer/Deserializer objects for usage with SQLAlchemy query structures,
 allowing "contextual" deserialization.
index 057e3bfbe06c4dda22a05222279c0d004eb8ca86..f894c3226b7fae836193d359fdb35872d853618e 100644 (file)
@@ -5,7 +5,9 @@
 # This module is part of SQLAlchemy and is released under
 # the MIT License: https://www.opensource.org/licenses/mit-license.php
 
-"""Future 2.0 API features.
+"""2.0 API features.
+
+this module is legacy as 2.0 APIs are now standard.
 
 """
 from .engine import Connection as Connection
index 788c94193c022ec16e3a0b561c6936c5d9413d89..aa3bdc86df8109a75031b51e966b364fbf34fc09 100644 (file)
@@ -1,3 +1,15 @@
-from ..engine import Connection  # noqa
-from ..engine import create_engine  # noqa
-from ..engine import Engine  # noqa
+# sql/future/engine.py
+# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
+# <see AUTHORS file>
+#
+# This module is part of SQLAlchemy and is released under
+# the MIT License: https://www.opensource.org/licenses/mit-license.php
+"""2.0 API features.
+
+this module is legacy as 2.0 APIs are now standard.
+
+"""
+
+from ..engine import Connection as Connection
+from ..engine import create_engine as create_engine
+from ..engine import Engine as Engine
diff --git a/lib/sqlalchemy/future/orm/__init__.py b/lib/sqlalchemy/future/orm/__init__.py
deleted file mode 100644 (file)
index 629631b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# sql/future/orm/__init__.py
-# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: https://www.opensource.org/licenses/mit-license.php
-
-"""Future 2.0 API features for Orm.
-
-"""
index 141702ae65cde21729b33e9f819abb2f8ffcc8c0..58900ab99ac920df0ad081237c8129efb9f6216f 100644 (file)
@@ -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")
index 48615b174b1aa8069ee4e68acbe3319439231483..bc41c69826bb9195690488ce91b8f23a7f2f3d62 100644 (file)
@@ -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
 
index 619af65104427aeb04d9a96fbe8be0e68441b7bc..9a6e94e228a09eb31e42422d336b952513debc66 100644 (file)
@@ -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")
 
index fe6dbfdc9abae09f4fdb73557b64835eb8b8fd64..473468c6cde98e030280ad34f7e7ffdf0dada4f8 100644 (file)
@@ -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
index b1854de5a33f9ac9545e60598fe15a2f138edbb5..717f1d0d68b078fdb212e99d0e3189628b3b48a1 100644 (file)
@@ -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.
 
index 05287cbcfd3f41a192cd4e3156fbd7ef700311cc..7a263daf8865990427cadb4e1f6d80ca985982c5 100644 (file)
@@ -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
index d05d27b0e079642edcb4ce8d1f620ed5340e00d4..96c146b3ed1e506961f26d1589901054f2da2709 100644 (file)
@@ -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.
 
index a3b02bb948a5cf26b874fe05abadc1db42ec7482..63a37d0dae368b51397a28580ab06883331d24fe 100644 (file)
@@ -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.
 
index 1b3340dc5d90a4dba8830f94230af6ad507637a7..72936d1ab11371b381532cf8bd9a1ed6513a7273 100644 (file)
@@ -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
 
index 529a7cd01f0add0a07b461eab9721a446c368627..f157919ab979bee0c92ab5cc72ada3789a8be335 100644 (file)
@@ -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."""
 
index 88ceacd076a84caad9f10be56ae78b96cba00fa8..356958562f4d7e2d913140a57d44ae518ae7c741 100644 (file)
@@ -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.
 
index 6a5690be24ed8dab7178dafef803170f34b3930e..3e21b01023352337f263ebcb6d636ef10b870f2e 100644 (file)
@@ -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
 
 """
 
index d9949eb7a351161dc1e5812d73392e1c7a0c3979..61966d692e4400196d2c481eca17a60e2c6c78ec 100644 (file)
@@ -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)
index 0830350936f4091526a88893e94fc2ac9e472014..c83ed7c15514c9327bce92ccf1a66cd53b77e018 100644 (file)
@@ -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.
 
index d41c4ebb8bcc53d774a7d2e88189b21ac793b60b..56e7cca1addfd069baa0e6b6cbe51316e29e6fc0 100644 (file)
@@ -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
index 263d5610193b9ddae01e93533764fc72771e0f7c..736b140cd33d1ba5b1838c7192fc0e88867171b3 100644 (file)
@@ -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
index 2d85ba7f6490d273663961d828a13e2da73c6c9e..0ba22e7a7cbf9ae9fc1eba1c2cb1cc1be84e6de1 100644 (file)
@@ -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."""
index a49bd6f8ee2dad33221606e48734cfa1740ea3f0..4f63e241baefd4b681456546e0ff209b0c43bdcb 100644 (file)
@@ -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.
index 9ff284e733d6e280a9c86b1c65f713d803bca0ba..c83ffdb59892a9553c85c645c54784a812a632af 100644 (file)
@@ -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.
 
index 8148793b122961aacb2eb705aa3ca32196a7f314..7e8a6b4c6e9ad2597a96a8e8a4e6e573bcae9890 100644 (file)
@@ -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
 
index 790edefc6e6a8caa26c19bc9e98c2c344dd704c2..fb959654febce0fba2993b7410207758e993178d 100644 (file)
@@ -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
 
 """Foundational utilities common to many sql modules.
 
index 9b7231360e2ae4c37a72db0eb302d858249b35e8..2cf67abed35e695f071592117ea72937cf8e0e69 100644 (file)
@@ -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
 
index a1b25b8a6b2ebd3ba0192e98eebaf5dce643c692..19435b59c23597ae5c4a0afc725b4e2869d6cec7 100644 (file)
@@ -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
 
 """Base SQL and DDL compiler implementations.
 
index 29d7b45d7ad7279de2a94ec6c390a94ff607455c..d3329c3916c2580ea741a1b920dd246f89da6d6e 100644 (file)
@@ -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
 
 """Functions used by compiler.py to determine the parameters rendered
 within INSERT and UPDATE statements.
index 052af6ac9da102fba6905307116b9a8391bb15db..eadaa24d357951f6cc1807be4322cda510ea6410 100644 (file)
@@ -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: allow-untyped-defs, allow-untyped-calls
+
 """
 Provides the hierarchy of DDL-defining schema items as well as routines
 to invoke them for a create/drop call.
index a29561291839dd01bf4867c1df257b230e41a63e..41b7f6392ef4c45d3dab9118c4f39649ad678bc5 100644 (file)
@@ -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
 
 """Core SQL expression elements, including :class:`_expression.ClauseElement`,
 :class:`_expression.ColumnElement`, and derived classes.
index b827df3df8dd153c819ad713bd40dc96628b845d..0cba1a1a8f54ebffd1e9e863ca5667ae2e4ebc37 100644 (file)
@@ -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
 
 """SQL function API, factories, and built-in functions.
 
index 4b220188f72125deed0882717f534fa5f790097e..608da7104442c74fca7c0fc09b1174abb4393ddb 100644 (file)
@@ -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
 
@@ -47,7 +48,6 @@ from ..util.typing import Self
 
 if TYPE_CHECKING:
     from .cache_key import CacheConst
-    from .cache_key import NO_CACHE
     from .elements import BindParameter
     from .elements import ClauseElement
     from .roles import SQLRole
index 9b6fcdbae863c2ecd88833791dd014bf5f8710d7..eaa5d8dd3b7a768820b3508659f406162702d9c2 100644 (file)
@@ -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
 
 """Establish constraint and index naming conventions.
 
index b08f13f993e8f658fde2a874e421e75cda6f2f0b..dab25965b39b9ef59eb6f30ffd33feb1e79166fe 100644 (file)
@@ -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
 
 """The :class:`_expression.FromClause` class of SQL expression elements,
 representing
index 65b97d565075776ac89c8df00c9eb4f9baa357d5..d2d5e4e87d4887c648f32b1f0d9ae530f69aec11 100644 (file)
@@ -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
 
 """SQL specific types.
 
index c23cd04dd4b2e1dfeef9532c384ea3e8e7f29fa9..aceed99a5d9369d429c1290dfef98ca94cabbb65 100644 (file)
@@ -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
 
index 8c45ba4101298ea2fe21ff9cb2594de236bd8226..2e0112f08f3cc1d5f1651b676b399072eabacf57 100644 (file)
@@ -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
 
 """High level utilities which build upon other modules here.
 
index da6292fcf439073472b60ae2ce15fc54b382a962..8c3c4bc274cd8f405868220db25e9d4701bc02b0 100644 (file)
@@ -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 unittest import mock
 
index 2e46ed8245f5547c02733fb8c1da84eeff611ede..e33d61f6db5b12edf92abac97ef71e5277957fba 100644 (file)
@@ -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
 
index 0c539baab92c9acefab68277597ed753e4f74844..a6e3c87644ca32764f6b1e405f39b49db8644d27 100644 (file)
@@ -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
 
index 0acec0def9d00baef6d74691d9e6e7418005f8ce..933f242b033f6b0683142b1ea008aff27088bf70 100644 (file)
@@ -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
 
 
 # functions and wrappers to run tests, fixtures, provisioning and
index 04a6a1d3ac3709474d822ed7be53785cb33e332d..e418b48be726a886bee6a4d1720a72eedf0219b5 100644 (file)
@@ -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
 
index f1bf5c0c4ecf8766c888d3d9c50ada59af3bd910..c083f4e732f9fd343929301b28ebad98ba4fe22f 100644 (file)
@@ -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
 
index 67a3095706d1e4ed202cb2157b002e0bb52c6d4c..cf31388350204d783432db444de8a50d623d292a 100644 (file)
@@ -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
 
index b51f6e57c5850b0f271a0bb2711e0b9e198b39b6..25c6a048227fe7a21ab1e476197c007c0635a009 100644 (file)
@@ -4,7 +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
 
 import contextlib
 import operator
index b4b9cab5fd3b65bb1342645019782d96725a8102..53f76f3ce2f84456fac0d48dfe2445fb67b0695e 100644 (file)
@@ -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
 
index f336444a2655fb131a5f9f4685131c00473fa4cd..c14c681f67e1dd1d557502c4921c3787ec4b1d13 100644 (file)
@@ -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
+
 
 """Classes used in pickling tests, need to be at the module level for
 unpickling.
index e4f6058e108b17076fa388d0ccf8bc59af3ab1b9..f93b8d3e629eca50e60a73f8bcc6268d2fe997de 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 """
 Bootstrapper for test framework plugins.
 
index 16924a0a1b23a3820794e045df44fc828514edff..c20110071d67674bb20b7c4e8bd46f8651550690 100644 (file)
@@ -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
 
index ab93e60e259e58be5b7c3605ce6d65d47617ccdf..fa7d2ca19b0222cd619e02439f47bbc26e23d52f 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from __future__ import annotations
 
 import argparse
index 6fc5efc50a8117bb5b7c5d1558fe6e88d86b1955..7672bcde5b1e76b102b36bef675f073c2ef44ee3 100644 (file)
@@ -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
+
 
 """Profiling support for unit and performance tests.
 
index 6e5555b3305bb33d48b506c45f0fa35d753bb632..d7f7958060791f553b17166178ba70ede68b74e8 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from __future__ import annotations
 
 import collections
index 01c7b07686881a82c59af89c38f8427803849f54..234f823c68212255eab50ba914f4cd3d8398ee02 100644 (file)
@@ -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
+
 
 """Global database feature support policy.
 
index ca725976bcea4d3937f97cbcf5a7918d59d120cc..949f30e53335bb06a85c531be2bc078026ec340f 100644 (file)
@@ -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
 
index a94ee55dc03c92e464c968f0be66dbb9edca4fed..c52b30e03abcf03879e6e9a749f7c12c2a3e7637 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .. import fixtures
 from ..assertions import eq_
 from ..schema import Column
index b3fee551e0114e69b8d353ded2c50c067a5cc1d3..35651170d128c48f80c2ff4a74ccf25f25ffc8db 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import random
 
 from . import testing
index b36162fa59b1d87ee4d676affaa00277d7c67fda..c453cbfed925aed49899861c52a2186c16307afe 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .. import fixtures
 from ..assertions import eq_
 from ..schema import Column
index aeb1991d1de0e146c485357277f1017711166dd1..55276e21b2e0cfcc6813e055018852c9d58edc50 100644 (file)
@@ -1,4 +1,6 @@
 #! coding: utf-8
+# mypy: ignore-errors
+
 
 from . import testing
 from .. import assert_raises
index 080bb486ecff1872d14b7b7268f5fa40606ed69f..f0e4bfcc6d18174221efab8117e4da19bf8281bf 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .. import fixtures
 from ..assertions import eq_
 from ..config import requirements
index 278f894724499e196bfa068e547828390ede7be3..b09b962275ac3b205d71886cc94561af0348be8c 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import operator
 import re
 
index a8900ece148961ee2d9710434e630f31f9da1fa8..59e9cc7f4bcd988fa025de77cd7b9d47f74fad8c 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import datetime
 
 from .. import engines
index 82e831f496697aa7639b2c3806625c1387f4e0cc..d1bf9ae154d357b21d330ac717c19cf4c7bf7f1f 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from sqlalchemy import bindparam
 from sqlalchemy import Column
 from sqlalchemy import Integer
index 92fd29503e66f982545f33f9cd0b74f6cd1e1346..838b740fd88fe6a2bd672772407647c7933f5595 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 import collections.abc as collections_abc
 import itertools
 
index d6747d2538651556cceca5089a2f96dd80cfd13a..53398ea31d5d2242ff4ae32e34ab71e0b19bde46 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .. import config
 from .. import fixtures
 from ..assertions import eq_
index 25fe844c38f3e947c19bebfcc5be0dae18c72b5d..817d3a53d29f77c7ecac4ac57d84063c56ec4b50 100644 (file)
@@ -1,4 +1,5 @@
-# coding: utf-8
+# mypy: ignore-errors
+
 
 import datetime
 import decimal
index a0cd6734a5f85af5a927879fc51bb8c61a796e8e..01597893727ef2c30fb327d302063d963515f097 100644 (file)
@@ -1,5 +1,5 @@
-# coding: utf-8
-"""verrrrry basic unicode column name testing"""
+# mypy: ignore-errors
+
 
 from sqlalchemy import desc
 from sqlalchemy import ForeignKey
index f04a9d57ef0eddbb44ecd2308ef3c1c57463bffb..62776ea6b3602344cf4a837ec585c35848330a5d 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
 from .. import fixtures
 from ..assertions import eq_
 from ..schema import Column
index 0cba4e16b19d322878cb332f169831e034e85b52..0070b4d6700d428ee7002911114329434449c4ea 100644 (file)
@@ -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
 
index 491b8b2cb82b9b3df624d5b75989b7e1c2cb5ef1..db36a289112c81f81f656a16b8487e5415e34f41 100644 (file)
@@ -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
 
 import warnings
index ed69450903b321677e94209b671d8671209e6cee..e9b0c93f283d6dac601d306e41fef3f730207f2f 100644 (file)
@@ -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
 
 """Collection classes and helpers."""
 from __future__ import annotations
index 167c4214016cda4e864439e11c881bc195269721..17b4b349881049b1f4f9e9039b0b3e12c36af77f 100644 (file)
@@ -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: allow-untyped-defs, allow-untyped-calls
+
 from __future__ import annotations
 
 import asyncio
index b09338f21eb347fa1c242f9e5418c82084749401..cf68c1933b9037cf0fd26e058198ee7e79b98a91 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: allow-untyped-defs, allow-untyped-calls
+
 import os
 import typing
 
index b02bca28f80239b2249387db6fe867321d2c06d5..d36157b105d7f033c08ecb7e81c4346b40a9978a 100644 (file)
@@ -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
 
index aeaefa40e311e110413a8074e120d111430d77b8..24fa0f3e38e30cfe894376a09dbb20ddea6cf9b7 100644 (file)
@@ -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
 
 """Handle Python version/platform incompatibilities."""
 
index c1d53cc16f5918bdfcd17edfccfe02a8999fcf2f..7bbe9ec199ce43d6c03e07728a898fb2db6d50a9 100644 (file)
@@ -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: allow-untyped-defs, allow-untyped-calls
+
 from __future__ import annotations
 
 import asyncio  # noqa
index 7c80ef4e0216da7c22a2721d5ae43dd00095ea7a..2ef51608b631724e09de18854f540d6d3cf4f79e 100644 (file)
@@ -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
 
 """Helpers related to deprecation of functions, methods, classes, other
 functionality."""
index da3fbc718a64bdf0fece07827d99511e9409ca10..10110dbbee66ae00b2dcc113054af24de3a0fb0e 100644 (file)
@@ -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
 
 """Routines to help with the creation, loading and introspection of
 modules, classes, hierarchies, attributes, functions, and methods.
index ee3227d775f6567853121997bb8621068153c874..fce3cd3b0bf561c447b52ce40213217bd3473dd1 100644 (file)
@@ -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
 
 """supplies the "preloaded" registry to resolve circular module imports at
 runtime.
@@ -21,15 +22,15 @@ from typing import TypeVar
 
 _FN = TypeVar("_FN", bound=Callable[..., Any])
 
+
 if TYPE_CHECKING:
-    from sqlalchemy.engine import default as engine_default
-    from sqlalchemy.orm import descriptor_props as orm_descriptor_props
-    from sqlalchemy.orm import relationships as orm_relationships
-    from sqlalchemy.orm import session as orm_session
-    from sqlalchemy.orm import util as orm_util
-    from sqlalchemy.sql import dml as sql_dml
-    from sqlalchemy.sql import functions as sql_functions
-    from sqlalchemy.sql import util as sql_util
+    from sqlalchemy.engine import default as engine_default  # noqa
+    from sqlalchemy.orm import relationships as orm_relationships  # noqa
+    from sqlalchemy.orm import session as orm_session  # noqa
+    from sqlalchemy.orm import util as orm_util  # noqa
+    from sqlalchemy.sql import dml as sql_dml  # noqa
+    from sqlalchemy.sql import functions as sql_functions  # noqa
+    from sqlalchemy.sql import util as sql_util  # noqa
 
 
 class _ModuleRegistry:
index 06b60c8bf8fd0fea05ecc9ff547926ff63c58e68..56fed7d5e1afebaaae5a580ffbb2b6e89656864c 100644 (file)
@@ -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
 
 """An adaptation of Py2.3/2.4's Queue module which supports reentrant
 behavior, using RLock instead of Lock for its mutex object.  The
index bccb16672c0f8f8df2c1acdcd2a0b58678099ea1..37297103efd0d2ccea43e1e3d71048a7e6e617fe 100644 (file)
@@ -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
 
 """Topological sorting algorithms."""
 
index 2a215c4f1a9fb4f9c8c9c3b7cdcbd7bd939bb7e3..4929ba1a658c65b1dd5ae27577ebe6081666a328 100644 (file)
@@ -1,3 +1,5 @@
+# mypy: allow-untyped-defs, allow-untyped-calls
+
 from __future__ import annotations
 
 import sys
index 516831bca55bd8984e827970dd42e3d5ce0bc5e3..f8498fde94e7f8d072179a782908da31582dcd21 100644 (file)
@@ -45,118 +45,48 @@ reportPrivateUsage = "none"
 reportUnusedClass = "none"
 reportUnusedFunction = "none"
 reportTypedDictNotRequiredAccess = "warning"
-#reportIncompatibleMethodOverride = "error"
 
 [tool.mypy]
 mypy_path = "./lib/"
 show_error_codes = true
-strict = true
 incremental = true
 
-[[tool.mypy.overrides]]
-
-#####################################################################
-# modules / packages explicitly not checked by Mypy at all right now.
-module = [
-    "sqlalchemy.engine.reflection",  # interim, should be strict
-
-    # TODO for strict:
-    "sqlalchemy.ext.automap",
-    "sqlalchemy.ext.compiler",
-    "sqlalchemy.ext.declarative.*",
-    "sqlalchemy.ext.mutable",
-    "sqlalchemy.ext.horizontal_shard",
-
-    # TODO for non-strict:
-    "sqlalchemy.ext.baked",
-    "sqlalchemy.ext.instrumentation",
-    "sqlalchemy.ext.indexable",
-    "sqlalchemy.ext.orderinglist",
-    "sqlalchemy.ext.serializer",
-
-    # not yet classified:
-    "sqlalchemy.orm.*",
-    "sqlalchemy.dialects.*",
-    "sqlalchemy.cyextension.*",
-    "sqlalchemy.future.*",
-    "sqlalchemy.testing.*",
-
-]
-
-warn_unused_ignores = false
-ignore_errors = true
 
-################################################
-# modules explicitly for Mypy strict checking
 [[tool.mypy.overrides]]
 
 module = [
-    # packages
-    "sqlalchemy.connectors.*",
-    "sqlalchemy.event.*",
-    "sqlalchemy.ext.*",
-    "sqlalchemy.sql.*",
-    "sqlalchemy.engine.*",
-    "sqlalchemy.pool.*",
-
-    # uncomment, trying to make sure mypy
-    # is at a baseline
-    # "sqlalchemy.orm._orm_constructors",
-
-    "sqlalchemy.orm.path_registry",
-    "sqlalchemy.orm.scoping",
-    "sqlalchemy.orm.session",
-    "sqlalchemy.orm.state",
-
-    # modules
-    "sqlalchemy.events",
-    "sqlalchemy.exc",
-    "sqlalchemy.inspection",
-    "sqlalchemy.schema",
-    "sqlalchemy.types",
+    "sqlalchemy.*"
 ]
 
 warn_unused_ignores = false
-ignore_errors = false
 strict = true
 
-################################################
-# modules explicitly for Mypy non-strict checking
 [[tool.mypy.overrides]]
 
+#####################################################################
+# interim list of modules that need some level of type checking to
+# pass
 module = [
-    "sqlalchemy.engine.cursor",
-    "sqlalchemy.engine.default",
-
-    "sqlalchemy.sql.base",
-    "sqlalchemy.sql.coercions",
-    "sqlalchemy.sql.compiler",
-    "sqlalchemy.sql.crud",
-    "sqlalchemy.sql.ddl",  # would be nice as strict
-    "sqlalchemy.sql.elements",    # would be nice as strict
-    "sqlalchemy.sql.functions",  # would be nice as strict, requires sqltypes
-    "sqlalchemy.sql.lambdas",
-    "sqlalchemy.sql.naming",
-    "sqlalchemy.sql.selectable",   # would be nice as strict
-    "sqlalchemy.sql.sqltypes",   # would be nice as strict
-    "sqlalchemy.sql.traversals",
-    "sqlalchemy.sql.util",
-
-    "sqlalchemy.orm._orm_constructors",
-
-    "sqlalchemy.orm.interfaces",
-    "sqlalchemy.orm.mapper",
-    "sqlalchemy.orm.util",
-
-    "sqlalchemy.util.*",
-]
 
+    # TODO for ORM, non-strict
+    "sqlalchemy.orm.base",
+    "sqlalchemy.orm.decl_base",
+    "sqlalchemy.orm.descriptor_props",
+    "sqlalchemy.orm.identity",
+    "sqlalchemy.orm.mapped_collection",
+    "sqlalchemy.orm.properties",
+    "sqlalchemy.orm.relationships",
+    "sqlalchemy.orm.strategy_options",
+    "sqlalchemy.orm.state_changes",
+
+    # would ideally be strict
+    "sqlalchemy.orm.decl_api",
+    "sqlalchemy.orm.events",
+    "sqlalchemy.orm.query",
+    "sqlalchemy.engine.reflection",
 
+]
+
+ignore_errors = true
 warn_unused_ignores = false
-ignore_errors = false
 
-# mostly strict without requiring totally untyped things to be
-# typed
-strict = true
-allow_untyped_defs = true
-allow_untyped_calls = true