From 569ac502edddd5bba63a0d66183256f12a1cbfb5 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 28 Feb 2019 11:56:39 -0500 Subject: [PATCH 1/2] update aiohttp and astroid requirement pylint 2.3.0 fixes aiohttp failure --- .travis.yml | 2 -- setup.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 373466211..1e5893468 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,6 @@ jobs: - stage: code quality name: "pylint & mypy" install: - - pip install astroid==2.0.4 - # newer astroid and aiohttp fails in pylint so we pre-install older version - pip install pylint mypy - pip install -e . script: diff --git a/setup.py b/setup.py index 7460ef845..784a27a80 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with open(os.path.join(BASE, 'README.md'), encoding='utf-8') as fh: long_description = fh.read() REQUIRES = [ - 'aiohttp==3.4.4', # more recent version of aiohttp break with pylint/astroid + 'aiohttp==3.5.4', 'cffi==1.12.1', # TODO: 1.12.2 fails on travis in wine 'coincurve==11.0.0', 'pbkdf2==1.3', From a79be0513bfb845e13ae50171967742af20c0e2f Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 28 Feb 2019 12:00:44 -0500 Subject: [PATCH 2/2] pylint --- torba/client/basetransaction.py | 4 ++-- torba/orchstr8/node.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/torba/client/basetransaction.py b/torba/client/basetransaction.py index a022bfa2b..ff4582250 100644 --- a/torba/client/basetransaction.py +++ b/torba/client/basetransaction.py @@ -350,7 +350,7 @@ class BaseTransaction: "Cannot access net_account_balance if inputs/outputs do not " "have is_my_account set properly." ) - elif txi.is_my_account: + if txi.is_my_account: balance -= txi.amount for txo in self.outputs: if txo.is_my_account is None: @@ -358,7 +358,7 @@ class BaseTransaction: "Cannot access net_account_balance if inputs/outputs do not " "have is_my_account set properly." ) - elif txo.is_my_account: + if txo.is_my_account: balance += txo.amount return balance diff --git a/torba/orchstr8/node.py b/torba/orchstr8/node.py index e9113de8c..769504690 100644 --- a/torba/orchstr8/node.py +++ b/torba/orchstr8/node.py @@ -243,7 +243,7 @@ class BlockchainProcess(asyncio.SubprocessProtocol): if b'Error:' in data: self.ready.set() raise SystemError(data.decode()) - elif b'Done loading' in data: + if b'Done loading' in data: self.ready.set() def process_exited(self):