More pylint cleanups

This commit is contained in:
Joshua Harlow
2013-05-22 12:31:29 -07:00
parent 11c7c92e01
commit 6793bec492
4 changed files with 11 additions and 11 deletions

View File

@@ -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]

View File

@@ -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)

View File

@@ -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

View File

@@ -29,6 +29,7 @@ def close_all(*args):
continue
a.close()
def null_functor(*args, **kwargs): # pylint: disable=W0613
return None