From 1e278de4cc9a4181e0747640a960e80efcea1ca9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 6 Jan 2019 01:19:47 -0500 Subject: Post black reformatting Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe --- lib/sqlalchemy/testing/plugin/plugin_base.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py') diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 5d6bf2975..537ab06dc 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -15,8 +15,9 @@ functionality via py.test. from __future__ import absolute_import -import sys import re +import sys + py3k = sys.version_info >= (3, 0) @@ -245,7 +246,8 @@ def post_begin(): # late imports, has to happen after config as well # as nose plugins like coverage - global util, fixtures, engines, exclusions, assertions, warnings, profiling, config, testing + global util, fixtures, engines, exclusions, assertions + global warnings, profiling, config, testing from sqlalchemy import testing # noqa from sqlalchemy.testing import fixtures, engines, exclusions # noqa from sqlalchemy.testing import assertions, warnings, profiling # noqa @@ -525,8 +527,8 @@ def generate_sub_tests(cls, module): # pytest junit plugin, which is tripped up by the brackets # and periods, so sanitize - alpha_name = re.sub("[_\[\]\.]+", "_", cfg.name) - alpha_name = re.sub("_+$", "", alpha_name) + alpha_name = re.sub(r"[_\[\]\.]+", "_", cfg.name) + alpha_name = re.sub(r"_+$", "", alpha_name) name = "%s_%s" % (cls.__name__, alpha_name) subcls = type( name, -- cgit v1.2.1