summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-04-27 15:43:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-04-28 15:02:50 -0400
commitf2bd4f513628bb2a7a8e8b36383e3a4324eac803 (patch)
treec01bb4784f8bc47c14e4db7de4766ae9449c3026 /lib/sqlalchemy/testing
parentad11c482e2233f44e8747d4d5a2b17a995fff1fa (diff)
downloadsqlalchemy-f2bd4f513628bb2a7a8e8b36383e3a4324eac803.tar.gz
inline mypy config; files ignoring type errors for the moment
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
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/__init__.py2
-rw-r--r--lib/sqlalchemy/testing/assertions.py2
-rw-r--r--lib/sqlalchemy/testing/assertsql.py2
-rw-r--r--lib/sqlalchemy/testing/asyncio.py1
-rw-r--r--lib/sqlalchemy/testing/config.py2
-rw-r--r--lib/sqlalchemy/testing/engines.py2
-rw-r--r--lib/sqlalchemy/testing/entities.py2
-rw-r--r--lib/sqlalchemy/testing/exclusions.py2
-rw-r--r--lib/sqlalchemy/testing/fixtures.py2
-rw-r--r--lib/sqlalchemy/testing/pickleable.py2
-rw-r--r--lib/sqlalchemy/testing/plugin/bootstrap.py2
-rw-r--r--lib/sqlalchemy/testing/plugin/plugin_base.py2
-rw-r--r--lib/sqlalchemy/testing/plugin/pytestplugin.py2
-rw-r--r--lib/sqlalchemy/testing/profiling.py2
-rw-r--r--lib/sqlalchemy/testing/provision.py2
-rw-r--r--lib/sqlalchemy/testing/requirements.py2
-rw-r--r--lib/sqlalchemy/testing/schema.py1
-rw-r--r--lib/sqlalchemy/testing/suite/test_cte.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_ddl.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_deprecations.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_dialect.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_insert.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_results.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_rowcount.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_select.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_sequence.py2
-rw-r--r--lib/sqlalchemy/testing/suite/test_types.py3
-rw-r--r--lib/sqlalchemy/testing/suite/test_unicode_ddl.py4
-rw-r--r--lib/sqlalchemy/testing/suite/test_update_delete.py2
-rw-r--r--lib/sqlalchemy/testing/util.py2
-rw-r--r--lib/sqlalchemy/testing/warnings.py2
32 files changed, 61 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/__init__.py b/lib/sqlalchemy/testing/__init__.py
index da6292fcf..8c3c4bc27 100644
--- a/lib/sqlalchemy/testing/__init__.py
+++ b/lib/sqlalchemy/testing/__init__.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 unittest import mock
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 2e46ed824..e33d61f6d 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.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/testing/assertsql.py b/lib/sqlalchemy/testing/assertsql.py
index 0c539baab..a6e3c8764 100644
--- a/lib/sqlalchemy/testing/assertsql.py
+++ b/lib/sqlalchemy/testing/assertsql.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/testing/asyncio.py b/lib/sqlalchemy/testing/asyncio.py
index 0acec0def..933f242b0 100644
--- a/lib/sqlalchemy/testing/asyncio.py
+++ b/lib/sqlalchemy/testing/asyncio.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
# functions and wrappers to run tests, fixtures, provisioning and
diff --git a/lib/sqlalchemy/testing/config.py b/lib/sqlalchemy/testing/config.py
index 04a6a1d3a..e418b48be 100644
--- a/lib/sqlalchemy/testing/config.py
+++ b/lib/sqlalchemy/testing/config.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/testing/engines.py b/lib/sqlalchemy/testing/engines.py
index f1bf5c0c4..c083f4e73 100644
--- a/lib/sqlalchemy/testing/engines.py
+++ b/lib/sqlalchemy/testing/engines.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/testing/entities.py b/lib/sqlalchemy/testing/entities.py
index 67a309570..cf3138835 100644
--- a/lib/sqlalchemy/testing/entities.py
+++ b/lib/sqlalchemy/testing/entities.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/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py
index b51f6e57c..25c6a0482 100644
--- a/lib/sqlalchemy/testing/exclusions.py
+++ b/lib/sqlalchemy/testing/exclusions.py
@@ -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
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py
index b4b9cab5f..53f76f3ce 100644
--- a/lib/sqlalchemy/testing/fixtures.py
+++ b/lib/sqlalchemy/testing/fixtures.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/testing/pickleable.py b/lib/sqlalchemy/testing/pickleable.py
index f336444a2..c14c681f6 100644
--- a/lib/sqlalchemy/testing/pickleable.py
+++ b/lib/sqlalchemy/testing/pickleable.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
+
"""Classes used in pickling tests, need to be at the module level for
unpickling.
diff --git a/lib/sqlalchemy/testing/plugin/bootstrap.py b/lib/sqlalchemy/testing/plugin/bootstrap.py
index e4f6058e1..f93b8d3e6 100644
--- a/lib/sqlalchemy/testing/plugin/bootstrap.py
+++ b/lib/sqlalchemy/testing/plugin/bootstrap.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
"""
Bootstrapper for test framework plugins.
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index 16924a0a1..c20110071 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.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/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py
index ab93e60e2..fa7d2ca19 100644
--- a/lib/sqlalchemy/testing/plugin/pytestplugin.py
+++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from __future__ import annotations
import argparse
diff --git a/lib/sqlalchemy/testing/profiling.py b/lib/sqlalchemy/testing/profiling.py
index 6fc5efc50..7672bcde5 100644
--- a/lib/sqlalchemy/testing/profiling.py
+++ b/lib/sqlalchemy/testing/profiling.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
+
"""Profiling support for unit and performance tests.
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 6e5555b33..d7f795806 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from __future__ import annotations
import collections
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py
index 01c7b0768..234f823c6 100644
--- a/lib/sqlalchemy/testing/requirements.py
+++ b/lib/sqlalchemy/testing/requirements.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
+
"""Global database feature support policy.
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py
index ca725976b..949f30e53 100644
--- a/lib/sqlalchemy/testing/schema.py
+++ b/lib/sqlalchemy/testing/schema.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
diff --git a/lib/sqlalchemy/testing/suite/test_cte.py b/lib/sqlalchemy/testing/suite/test_cte.py
index a94ee55dc..c52b30e03 100644
--- a/lib/sqlalchemy/testing/suite/test_cte.py
+++ b/lib/sqlalchemy/testing/suite/test_cte.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from .. import fixtures
from ..assertions import eq_
from ..schema import Column
diff --git a/lib/sqlalchemy/testing/suite/test_ddl.py b/lib/sqlalchemy/testing/suite/test_ddl.py
index b3fee551e..35651170d 100644
--- a/lib/sqlalchemy/testing/suite/test_ddl.py
+++ b/lib/sqlalchemy/testing/suite/test_ddl.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
import random
from . import testing
diff --git a/lib/sqlalchemy/testing/suite/test_deprecations.py b/lib/sqlalchemy/testing/suite/test_deprecations.py
index b36162fa5..c453cbfed 100644
--- a/lib/sqlalchemy/testing/suite/test_deprecations.py
+++ b/lib/sqlalchemy/testing/suite/test_deprecations.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from .. import fixtures
from ..assertions import eq_
from ..schema import Column
diff --git a/lib/sqlalchemy/testing/suite/test_dialect.py b/lib/sqlalchemy/testing/suite/test_dialect.py
index aeb1991d1..55276e21b 100644
--- a/lib/sqlalchemy/testing/suite/test_dialect.py
+++ b/lib/sqlalchemy/testing/suite/test_dialect.py
@@ -1,4 +1,6 @@
#! coding: utf-8
+# mypy: ignore-errors
+
from . import testing
from .. import assert_raises
diff --git a/lib/sqlalchemy/testing/suite/test_insert.py b/lib/sqlalchemy/testing/suite/test_insert.py
index 080bb486e..f0e4bfcc6 100644
--- a/lib/sqlalchemy/testing/suite/test_insert.py
+++ b/lib/sqlalchemy/testing/suite/test_insert.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from .. import fixtures
from ..assertions import eq_
from ..config import requirements
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index 278f89472..b09b96227 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
import operator
import re
diff --git a/lib/sqlalchemy/testing/suite/test_results.py b/lib/sqlalchemy/testing/suite/test_results.py
index a8900ece1..59e9cc7f4 100644
--- a/lib/sqlalchemy/testing/suite/test_results.py
+++ b/lib/sqlalchemy/testing/suite/test_results.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
import datetime
from .. import engines
diff --git a/lib/sqlalchemy/testing/suite/test_rowcount.py b/lib/sqlalchemy/testing/suite/test_rowcount.py
index 82e831f49..d1bf9ae15 100644
--- a/lib/sqlalchemy/testing/suite/test_rowcount.py
+++ b/lib/sqlalchemy/testing/suite/test_rowcount.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from sqlalchemy import bindparam
from sqlalchemy import Column
from sqlalchemy import Integer
diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py
index 92fd29503..838b740fd 100644
--- a/lib/sqlalchemy/testing/suite/test_select.py
+++ b/lib/sqlalchemy/testing/suite/test_select.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
import collections.abc as collections_abc
import itertools
diff --git a/lib/sqlalchemy/testing/suite/test_sequence.py b/lib/sqlalchemy/testing/suite/test_sequence.py
index d6747d253..53398ea31 100644
--- a/lib/sqlalchemy/testing/suite/test_sequence.py
+++ b/lib/sqlalchemy/testing/suite/test_sequence.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from .. import config
from .. import fixtures
from ..assertions import eq_
diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py
index 25fe844c3..817d3a53d 100644
--- a/lib/sqlalchemy/testing/suite/test_types.py
+++ b/lib/sqlalchemy/testing/suite/test_types.py
@@ -1,4 +1,5 @@
-# coding: utf-8
+# mypy: ignore-errors
+
import datetime
import decimal
diff --git a/lib/sqlalchemy/testing/suite/test_unicode_ddl.py b/lib/sqlalchemy/testing/suite/test_unicode_ddl.py
index a0cd6734a..015978937 100644
--- a/lib/sqlalchemy/testing/suite/test_unicode_ddl.py
+++ b/lib/sqlalchemy/testing/suite/test_unicode_ddl.py
@@ -1,5 +1,5 @@
-# coding: utf-8
-"""verrrrry basic unicode column name testing"""
+# mypy: ignore-errors
+
from sqlalchemy import desc
from sqlalchemy import ForeignKey
diff --git a/lib/sqlalchemy/testing/suite/test_update_delete.py b/lib/sqlalchemy/testing/suite/test_update_delete.py
index f04a9d57e..62776ea6b 100644
--- a/lib/sqlalchemy/testing/suite/test_update_delete.py
+++ b/lib/sqlalchemy/testing/suite/test_update_delete.py
@@ -1,3 +1,5 @@
+# mypy: ignore-errors
+
from .. import fixtures
from ..assertions import eq_
from ..schema import Column
diff --git a/lib/sqlalchemy/testing/util.py b/lib/sqlalchemy/testing/util.py
index 0cba4e16b..0070b4d67 100644
--- a/lib/sqlalchemy/testing/util.py
+++ b/lib/sqlalchemy/testing/util.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/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py
index 491b8b2cb..db36a2891 100644
--- a/lib/sqlalchemy/testing/warnings.py
+++ b/lib/sqlalchemy/testing/warnings.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
import warnings