diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-11 17:17:19 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-11 19:48:58 -0400 |
commit | 6c2934661f38833ec2a325bb43f1dd5cdfec9ca1 (patch) | |
tree | 9bbd5288422d85f548cab1a9fa056edf56bc6836 /alembic/testing/plugin | |
parent | 1b46850adb7004f959b8f894fe4e066b3fef3648 (diff) | |
download | alembic-6c2934661f38833ec2a325bb43f1dd5cdfec9ca1.tar.gz |
Clean up all Python 3.6 warnings
Fixed a few Python3.6 deprecation warnings by replacing ``StopIteration``
with ``return``, as well as using ``getfullargspec()`` instead of
``getargspec()`` under Python 3.
Additionally fixed docstrings with backslashes needing r'', filehandles
not explicitly closed, accommodate for .pyc files not necessarily present.
Change-Id: Id9791c5fa8b4b1f3e4e36f237a8a8ebcef4aaaba
Fixes: #458
Diffstat (limited to 'alembic/testing/plugin')
-rw-r--r-- | alembic/testing/plugin/plugin_base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/alembic/testing/plugin/plugin_base.py b/alembic/testing/plugin/plugin_base.py index 0ed8f84..83b30e3 100644 --- a/alembic/testing/plugin/plugin_base.py +++ b/alembic/testing/plugin/plugin_base.py @@ -420,11 +420,10 @@ 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(r'[_\[\]\.]+', '_', cfg.name) alpha_name = re.sub('_+$', '', alpha_name) name = "%s_%s" % (cls.__name__, alpha_name) - subcls = type( name, (cls, ), |