Commit 22e91f7e authored by Kenneth Giusti's avatar Kenneth Giusti

fix pep8 failures

parent 011d101d
......@@ -373,7 +373,7 @@ def main(argv=None):
# Create the RPC caller
method = {'method': method_info[0],
'args': dict([(method_info[i], method_info[i+1])
'args': dict([(method_info[i], method_info[i + 1])
for i in range(1, len(method_info), 2)])}
my_caller = my_connection.create_caller(method,
"my-source-address",
......
......@@ -424,8 +424,6 @@ class Connection(Endpoint):
self._pn_sasl = None
self._pn_ssl = None
_REMOTE_REQ = (proton.Endpoint.LOCAL_UNINIT
| proton.Endpoint.REMOTE_ACTIVE)
_CLOSED = (proton.Endpoint.LOCAL_CLOSED | proton.Endpoint.REMOTE_CLOSED)
_ACTIVE = (proton.Endpoint.LOCAL_ACTIVE | proton.Endpoint.REMOTE_ACTIVE)
......
......@@ -188,15 +188,15 @@ class _Link(Endpoint):
def active(self):
state = self._pn_link.state
return (not self._failed and
state == (proton.Endpoint.LOCAL_ACTIVE
| proton.Endpoint.REMOTE_ACTIVE))
state == (proton.Endpoint.LOCAL_ACTIVE |
proton.Endpoint.REMOTE_ACTIVE))
@property
def closed(self):
state = self._pn_link.state
return (self._failed or
state == (proton.Endpoint.LOCAL_CLOSED
| proton.Endpoint.REMOTE_CLOSED))
state == (proton.Endpoint.LOCAL_CLOSED |
proton.Endpoint.REMOTE_CLOSED))
def reject(self, pn_condition):
self._rejected = True # prevent 'active' callback!
......
......@@ -201,8 +201,8 @@ class APITest(common.Test):
assert c1_events.remote_closed_ct == 0
c2.close()
common.process_connections(c1, c2)
assert (c1_events.remote_closed_ct == 1
and c2_events.remote_closed_ct == 0)
assert (c1_events.remote_closed_ct == 1 and
c2_events.remote_closed_ct == 0)
assert c1_events.closed_ct == 0 and c2_events.closed_ct == 0
assert not c1.active and not c2.active
c1.close()
......
......@@ -9,7 +9,7 @@ deps = -r{toxinidir}/test-requirements.txt
commands = {toxinidir}/tests/test-runner
[testenv:pep8]
commands = flake8 pyngus examples tests
commands = flake8 --ignore E402 pyngus examples tests
flake8 --ignore F401 setup.py
[flake8]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment