From f2bd4f513628bb2a7a8e8b36383e3a4324eac803 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 27 Apr 2022 15:43:02 -0400 Subject: 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 --- lib/sqlalchemy/future/__init__.py | 4 +++- lib/sqlalchemy/future/engine.py | 18 +++++++++++++++--- lib/sqlalchemy/future/orm/__init__.py | 10 ---------- 3 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 lib/sqlalchemy/future/orm/__init__.py (limited to 'lib/sqlalchemy/future') diff --git a/lib/sqlalchemy/future/__init__.py b/lib/sqlalchemy/future/__init__.py index 057e3bfbe..f894c3226 100644 --- a/lib/sqlalchemy/future/__init__.py +++ b/lib/sqlalchemy/future/__init__.py @@ -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 diff --git a/lib/sqlalchemy/future/engine.py b/lib/sqlalchemy/future/engine.py index 788c94193..aa3bdc86d 100644 --- a/lib/sqlalchemy/future/engine.py +++ b/lib/sqlalchemy/future/engine.py @@ -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 +# +# +# 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 index 629631b3e..000000000 --- a/lib/sqlalchemy/future/orm/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# sql/future/orm/__init__.py -# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors -# -# -# 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. - -""" -- cgit v1.2.1