From 655db3742238a7550b8465c6c132445478fa8314 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Fri, 2 Oct 2015 18:00:30 -0700 Subject: [PATCH] flakes --- docs/conf.py | 4 ++-- extra/release/bump_version.py | 5 ++++- funtests/tests/test_qpid.py | 3 ++- setup.py | 16 +++++++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index baaab08d..359e8462 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,9 +7,9 @@ import os # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. sys.path.append(os.path.join(os.pardir, "tests")) -import kombu +import kombu # noqa -from django.conf import settings +from django.conf import settings # noqa if not settings.configured: settings.configure() diff --git a/extra/release/bump_version.py b/extra/release/bump_version.py index 143fd03b..fba89927 100755 --- a/extra/release/bump_version.py +++ b/extra/release/bump_version.py @@ -10,10 +10,13 @@ import subprocess from contextlib import contextmanager from tempfile import NamedTemporaryFile -rq = lambda s: s.strip("\"'") str_t = str if sys.version_info[0] >= 3 else basestring +def rq(s): + return s.strip("\"'") + + def cmd(*args): return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0] diff --git a/funtests/tests/test_qpid.py b/funtests/tests/test_qpid.py index f4e8a8e4..adf42d25 100644 --- a/funtests/tests/test_qpid.py +++ b/funtests/tests/test_qpid.py @@ -2,6 +2,7 @@ from nose import SkipTest from funtests import transport + class test_qpid(transport.TransportCase): transport = 'qpid' prefix = 'qpid' @@ -10,4 +11,4 @@ class test_qpid(transport.TransportCase): try: import qpid.messaging # noqa except ImportError: - raise SkipTest('qpid.messaging not installed') \ No newline at end of file + raise SkipTest('qpid.messaging not installed') diff --git a/setup.py b/setup.py index f3121f7d..e91430ec 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import os +import re import sys import codecs +from distutils.command.install import INSTALL_SCHEMES + extra = {} PY3 = sys.version_info[0] == 3 @@ -15,14 +18,14 @@ try: except ImportError: from distutils.core import setup # noqa -from distutils.command.install import INSTALL_SCHEMES - # -- Parse meta -import re re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)') re_vers = re.compile(r'VERSION\s*=.*?\((.*?)\)') re_doc = re.compile(r'^"""(.+?)"""') -rq = lambda s: s.strip("\"'") + + +def rq(s): + return s.strip("\"'") def add_default(m): @@ -116,9 +119,12 @@ install_requires = reqs('default.txt') # -*- Tests Requires -*- + +def extras(*p): + return reqs('extras', *p) + tests_require = reqs('test3.txt' if PY3 else 'test.txt') -extras = lambda *p: reqs('extras', *p) extras_require = extra['extras_require'] = { 'msgpack': extras('msgpack.txt'), 'yaml': extras('yaml.txt'),