summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug.hellmann@dreamhost.com>2013-05-05 11:52:40 -0400
committerDoug Hellmann <doug.hellmann@dreamhost.com>2013-05-05 11:52:40 -0400
commit8040e7617bbb9e26786fc123aa52690c61753611 (patch)
tree3df72a2a8094728a2b19d19a171160075097d9b7
parentd05bcea552ffd479bcb9c2ea42d15f4d1de1c915 (diff)
downloadstevedore-8040e7617bbb9e26786fc123aa52690c61753611.tar.gz
flake8 fixes
Minor style changes to make flake8 pass. Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
-rw-r--r--setup.py6
-rw-r--r--stevedore/__init__.py2
-rw-r--r--stevedore/dispatch.py2
-rw-r--r--stevedore/driver.py2
-rw-r--r--stevedore/enabled.py4
-rw-r--r--stevedore/hook.py2
-rw-r--r--stevedore/named.py4
-rw-r--r--stevedore/tests/test_dispatch.py4
-rw-r--r--stevedore/tests/test_enabled.py4
-rw-r--r--stevedore/tests/test_hook.py2
-rw-r--r--stevedore/tests/test_named.py4
-rw-r--r--tox.ini8
12 files changed, 23 insertions, 21 deletions
diff --git a/setup.py b/setup.py
index 7bed957..3d0bca8 100644
--- a/setup.py
+++ b/setup.py
@@ -55,8 +55,8 @@ setup(
'stevedore.test.extension': [
't1 = stevedore.tests.test_extension:FauxExtension',
't2 = stevedore.tests.test_extension:FauxExtension',
- ],
- },
+ ],
+ },
zip_safe=False,
- )
+)
diff --git a/stevedore/__init__.py b/stevedore/__init__.py
index bc5960b..6e8f23b 100644
--- a/stevedore/__init__.py
+++ b/stevedore/__init__.py
@@ -1,3 +1,5 @@
+# flake8: noqa
+
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
diff --git a/stevedore/dispatch.py b/stevedore/dispatch.py
index 6f5c246..567ca9f 100644
--- a/stevedore/dispatch.py
+++ b/stevedore/dispatch.py
@@ -95,7 +95,7 @@ class NameDispatchExtensionManager(DispatchExtensionManager):
invoke_on_load=invoke_on_load,
invoke_args=invoke_args,
invoke_kwds=invoke_kwds,
- )
+ )
self.by_name = dict((e.name, e) for e in self.extensions)
def map(self, names, func, *args, **kwds):
diff --git a/stevedore/driver.py b/stevedore/driver.py
index b8351d4..e70a23e 100644
--- a/stevedore/driver.py
+++ b/stevedore/driver.py
@@ -29,7 +29,7 @@ class DriverManager(NamedExtensionManager):
invoke_on_load=invoke_on_load,
invoke_args=invoke_args,
invoke_kwds=invoke_kwds,
- )
+ )
if not self.extensions:
raise RuntimeError('No %r driver found, looking for %r' %
(namespace, name))
diff --git a/stevedore/enabled.py b/stevedore/enabled.py
index 7f0e239..e05ca0d 100644
--- a/stevedore/enabled.py
+++ b/stevedore/enabled.py
@@ -38,12 +38,12 @@ class EnabledExtensionManager(ExtensionManager):
invoke_on_load=invoke_on_load,
invoke_args=invoke_args,
invoke_kwds=invoke_kwds,
- )
+ )
def _load_one_plugin(self, ep, invoke_on_load, invoke_args, invoke_kwds):
ext = super(EnabledExtensionManager, self)._load_one_plugin(
ep, invoke_on_load, invoke_args, invoke_kwds,
- )
+ )
if ext and not self.check_func(ext):
LOG.debug('ignoring extension %r', ep.name)
return None
diff --git a/stevedore/hook.py b/stevedore/hook.py
index 5820775..8d2a79b 100644
--- a/stevedore/hook.py
+++ b/stevedore/hook.py
@@ -29,4 +29,4 @@ class HookManager(NamedExtensionManager):
invoke_on_load=invoke_on_load,
invoke_args=invoke_args,
invoke_kwds=invoke_kwds,
- )
+ )
diff --git a/stevedore/named.py b/stevedore/named.py
index 5a0d239..00f2966 100644
--- a/stevedore/named.py
+++ b/stevedore/named.py
@@ -32,7 +32,7 @@ class NamedExtensionManager(ExtensionManager):
invoke_on_load=invoke_on_load,
invoke_args=invoke_args,
invoke_kwds=invoke_kwds,
- )
+ )
def _load_one_plugin(self, ep, invoke_on_load, invoke_args, invoke_kwds):
# Check the name before going any further to prevent
@@ -42,4 +42,4 @@ class NamedExtensionManager(ExtensionManager):
return None
return super(NamedExtensionManager, self)._load_one_plugin(
ep, invoke_on_load, invoke_args, invoke_kwds,
- )
+ )
diff --git a/stevedore/tests/test_dispatch.py b/stevedore/tests/test_dispatch.py
index 37f6f58..7302f0f 100644
--- a/stevedore/tests/test_dispatch.py
+++ b/stevedore/tests/test_dispatch.py
@@ -15,7 +15,7 @@ def test_dispatch():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
assert len(em.extensions) == 2
assert set(em.names()) == set(['t1', 't2'])
@@ -39,7 +39,7 @@ def test_name_dispatch():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
assert len(em.extensions) == 2
assert set(em.names()) == set(['t1', 't2'])
diff --git a/stevedore/tests/test_enabled.py b/stevedore/tests/test_enabled.py
index 7cfff9b..659e710 100644
--- a/stevedore/tests/test_enabled.py
+++ b/stevedore/tests/test_enabled.py
@@ -10,7 +10,7 @@ def test_enabled():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
assert len(em.extensions) == 1
assert em.names() == ['t2']
@@ -24,6 +24,6 @@ def test_enabled_after_load():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
assert len(em.extensions) == 1
assert em.names() == ['t2']
diff --git a/stevedore/tests/test_hook.py b/stevedore/tests/test_hook.py
index 8d7eff4..1c5ea81 100644
--- a/stevedore/tests/test_hook.py
+++ b/stevedore/tests/test_hook.py
@@ -8,6 +8,6 @@ def test_hook():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
assert len(em.extensions) == 1
assert em.names() == ['t1']
diff --git a/stevedore/tests/test_named.py b/stevedore/tests/test_named.py
index 17af805..311c9c5 100644
--- a/stevedore/tests/test_named.py
+++ b/stevedore/tests/test_named.py
@@ -10,7 +10,7 @@ def test_named():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
actual = em.names()
assert actual == ['t1']
@@ -32,6 +32,6 @@ def test_enabled_before_load():
invoke_on_load=True,
invoke_args=('a',),
invoke_kwds={'b': 'B'},
- )
+ )
actual = em.names()
assert actual == []
diff --git a/tox.ini b/tox.ini
index 68c3314..c72e118 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py26,py27,py32,py33,pep8
+envlist = py26,py27,py32,py33,style
[testenv]
commands = nosetests -d --with-coverage --cover-inclusive --cover-package stevedore []
@@ -8,6 +8,6 @@ deps =
mock
coverage
-[testenv:pep8]
-deps = pep8
-commands = pep8 --repeat --ignore=E123 --show-source stevedore setup.py
+[testenv:style]
+deps = flake8
+commands = flake8 stevedore setup.py