From 71cb17c81d358646f8dfeac14e9662ce42bb94df Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Thu, 13 May 2021 21:20:51 +0200 Subject: Remove pep484 type comments from the code Current effort is around the stub package, and having typing in two places makes thing worse, since the types here are usually outdated compared to the version in the stubs. Once v2 gets under way we can start consolidating the types here. Fixes: #6461 Change-Id: I7132a444bd7138123074bf5bc664b4bb119a85ce --- lib/sqlalchemy/testing/plugin/pytestplugin.py | 15 ++------------- lib/sqlalchemy/testing/provision.py | 4 ---- 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'lib/sqlalchemy/testing') diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index 388d71c73..4e82f10c1 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -17,15 +17,6 @@ import sys import pytest - -try: - import typing -except ImportError: - pass -else: - if typing.TYPE_CHECKING: - from typing import Sequence - try: import xdist # noqa @@ -694,11 +685,9 @@ class PytestFixtureFunctions(plugin_base.FixtureFunctions): return fn else: if argnames is None: - _argnames = getargspec(fn).args[1:] # type: Sequence(str) + _argnames = getargspec(fn).args[1:] else: - _argnames = re.split( - r", *", argnames - ) # type: Sequence(str) + _argnames = re.split(r", *", argnames) if has_exclusions: _argnames += ["_exclusions"] diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index a976abee0..a911ba69c 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -16,9 +16,6 @@ log = logging.getLogger(__name__) FOLLOWER_IDENT = None -if compat.TYPE_CHECKING: - from ..engine import URL - class register(object): def __init__(self): @@ -181,7 +178,6 @@ def _generate_driver_urls(url, extra_drivers): @register.init def generate_driver_url(url, driver, query_str): - # type: (URL, str, str) -> URL backend = url.get_backend_name() new_url = url.set( -- cgit v1.2.1