summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-05-22 12:31:29 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-05-22 12:31:29 -0700
commit6793bec49274b3ece18273066e369a423e372255 (patch)
tree102bbb0e41d260ee5b6a9f060a713bf6ae22ba3a
parent11c7c92e01950ebd47cf46fc6c881d0848607577 (diff)
downloadtaskflow-6793bec49274b3ece18273066e369a423e372255.tar.gz
More pylint cleanups
-rw-r--r--pylintrc2
-rw-r--r--taskflow/backends/memory.py2
-rw-r--r--taskflow/tests/unit/test_graph_flow.py17
-rw-r--r--taskflow/tests/utils.py1
4 files changed, 11 insertions, 11 deletions
diff --git a/pylintrc b/pylintrc
index 1b7a688..622163f 100644
--- a/pylintrc
+++ b/pylintrc
@@ -1,7 +1,7 @@
[MESSAGES CONTROL]
# Disable the message(s) with the given id(s).
-disable=C0111,I0011,R0201,R0922,R0924,W0142,W0511,W0622,W0703
+disable=C0111,I0011,R0201,R0922,R0924,W0142,W0511,W0613,W0622,W0703
[BASIC]
diff --git a/taskflow/backends/memory.py b/taskflow/backends/memory.py
index 2e654c0..ae71254 100644
--- a/taskflow/backends/memory.py
+++ b/taskflow/backends/memory.py
@@ -39,7 +39,7 @@ def check_not_closed(meth):
@functools.wraps(meth)
def check(self, *args, **kwargs):
- if self._closed: # pylint: disable=W0212
+ if self._closed: # pylint: disable=W0212
raise exc.ClosedException("Unable to call %s on closed object" %
(meth.__name__))
return meth(self, *args, **kwargs)
diff --git a/taskflow/tests/unit/test_graph_flow.py b/taskflow/tests/unit/test_graph_flow.py
index fe70a3e..015344f 100644
--- a/taskflow/tests/unit/test_graph_flow.py
+++ b/taskflow/tests/unit/test_graph_flow.py
@@ -21,7 +21,6 @@ import unittest
from taskflow import exceptions as excp
from taskflow import states
-from taskflow import task
from taskflow import wrappers
from taskflow.patterns import graph_flow as gw
@@ -38,12 +37,12 @@ class GraphFlowTest(unittest.TestCase):
'a': 1,
}
- def run1_revert(context, result, cause): # pylint: disable=W0613
+ def run1_revert(context, result, cause): # pylint: disable=W0613
reverted.append('run1')
self.assertEquals(states.REVERTING, cause.flow.state)
self.assertEquals(result, {'a': 1})
- def run2(context, a): # pylint: disable=W0613,C0103
+ def run2(context, a): # pylint: disable=W0613,C0103
raise Exception('Dead')
flo.add(wrappers.FunctorTask(None, run1, run1_revert,
@@ -115,12 +114,12 @@ class GraphFlowTest(unittest.TestCase):
def test_connect_requirement_failure(self):
- def run1(context): # pylint: disable=W0613
+ def run1(context): # pylint: disable=W0613
return {
'a': 1,
}
- def run2(context, b, c, d): # pylint: disable=W0613,C0103
+ def run2(context, b, c, d): # pylint: disable=W0613,C0103
return None
flo = gw.Flow("test-flow")
@@ -140,25 +139,25 @@ class GraphFlowTest(unittest.TestCase):
run_order = []
f_args = {}
- def run1(context): # pylint: disable=W0613,C0103
+ def run1(context): # pylint: disable=W0613,C0103
run_order.append('ran1')
return {
'a': 1,
}
- def run2(context, a): # pylint: disable=W0613,C0103
+ def run2(context, a): # pylint: disable=W0613,C0103
run_order.append('ran2')
return {
'c': 3,
}
- def run3(context, a): # pylint: disable=W0613,C0103
+ def run3(context, a): # pylint: disable=W0613,C0103
run_order.append('ran3')
return {
'b': 2,
}
- def run4(context, b, c): # pylint: disable=W0613,C0103
+ def run4(context, b, c): # pylint: disable=W0613,C0103
run_order.append('ran4')
f_args['b'] = b
f_args['c'] = c
diff --git a/taskflow/tests/utils.py b/taskflow/tests/utils.py
index fb32149..4f56e9f 100644
--- a/taskflow/tests/utils.py
+++ b/taskflow/tests/utils.py
@@ -29,6 +29,7 @@ def close_all(*args):
continue
a.close()
+
def null_functor(*args, **kwargs): # pylint: disable=W0613
return None