From c27b962541c9ae68fd1e6dc691ddee883234f112 Mon Sep 17 00:00:00 2001 From: Ryan Beck-Buysse Date: Tue, 25 Aug 2020 11:01:09 -0500 Subject: [PATCH 1/4] Fix pylint W0707 errors Signed-off-by: Ryan Beck-Buysse --- .../sawtooth_intkey/client_cli/intkey_client.py | 10 +++++----- .../client_cli/intkey_workload.py | 4 ++-- .../sawtooth_intkey/processor/handler.py | 16 ++++++++-------- .../xo_python/sawtooth_xo/processor/config/xo.py | 2 +- .../sawtooth_xo/processor/xo_payload.py | 6 +++--- .../xo_python/sawtooth_xo/processor/xo_state.py | 4 ++-- examples/xo_python/sawtooth_xo/xo_client.py | 10 +++++----- sawtooth_signing/secp256k1.py | 9 ++++++--- .../tests/integration_tools.py | 4 ++-- 9 files changed, 34 insertions(+), 31 deletions(-) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py index 4f95b5184..471060011 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py @@ -50,13 +50,13 @@ def __init__(self, url, keyfile=None): fd.close() except OSError as err: raise IntkeyClientException( - 'Failed to read private key: {}'.format(str(err))) + 'Failed to read private key: {}'.format(str(err))) from err try: private_key = Secp256k1PrivateKey.from_hex(private_key_str) except ParseError as e: raise IntkeyClientException( - 'Unable to load private key: {}'.format(str(e))) + 'Unable to load private key: {}'.format(str(e))) from e self._signer = CryptoFactory( create_context('secp256k1')).new_signer(private_key) @@ -105,7 +105,7 @@ def _get_status(self, batch_id, wait): 'batch_statuses?id={}&wait={}'.format(batch_id, wait),) return yaml.safe_load(result)['data'][0]['status'] except BaseException as err: - raise IntkeyClientException(err) + raise IntkeyClientException(err) from err def _get_prefix(self): return _sha512('intkey'.encode('utf-8'))[0:6] @@ -141,10 +141,10 @@ def _send_request(self, suffix, data=None, content_type=None, name=None): except requests.ConnectionError as err: raise IntkeyClientException( - 'Failed to connect to REST API: {}'.format(err)) + 'Failed to connect to REST API: {}'.format(err)) from err except BaseException as err: - raise IntkeyClientException(err) + raise IntkeyClientException(err) from err return result.text diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py index 6366fe981..65afcea8d 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py @@ -103,9 +103,9 @@ def __init__(self, delegate, args): self._signer = crypto_factory.new_signer( private_key=private_key) except ParseError as pe: - raise IntKeyCliException(str(pe)) + raise IntKeyCliException(str(pe)) from pe except IOError as ioe: - raise IntKeyCliException(str(ioe)) + raise IntKeyCliException(str(ioe)) from ioe else: self._signer = crypto_factory.new_signer( context.new_random_private_key()) diff --git a/examples/intkey_python/sawtooth_intkey/processor/handler.py b/examples/intkey_python/sawtooth_intkey/processor/handler.py index f0c633a9d..974d5d203 100644 --- a/examples/intkey_python/sawtooth_intkey/processor/handler.py +++ b/examples/intkey_python/sawtooth_intkey/processor/handler.py @@ -83,23 +83,23 @@ def _unpack_transaction(transaction): def _decode_transaction(transaction): try: content = cbor.loads(transaction.payload) - except: - raise InvalidTransaction('Invalid payload serialization') + except Exception as e: + raise InvalidTransaction('Invalid payload serialization') from e try: verb = content['Verb'] except AttributeError: - raise InvalidTransaction('Verb is required') + raise InvalidTransaction('Verb is required') from AttributeError try: name = content['Name'] except AttributeError: - raise InvalidTransaction('Name is required') + raise InvalidTransaction('Name is required') from AttributeError try: value = content['Value'] except AttributeError: - raise InvalidTransaction('Value is required') + raise InvalidTransaction('Value is required') from AttributeError return verb, name, value @@ -134,8 +134,8 @@ def _get_state_data(name, context): return cbor.loads(state_entries[0].data) except IndexError: return {} - except: - raise InternalError('Failed to load state data') + except Exception as e: + raise InternalError('Failed to load state data') from e def _set_state_data(name, state, context): @@ -160,7 +160,7 @@ def _do_intkey(verb, name, value, state): return verbs[verb](name, value, state) except KeyError: # This would be a programming error. - raise InternalError('Unhandled verb: {}'.format(verb)) + raise InternalError('Unhandled verb: {}'.format(verb)) from KeyError def _do_set(name, value, state): diff --git a/examples/xo_python/sawtooth_xo/processor/config/xo.py b/examples/xo_python/sawtooth_xo/processor/config/xo.py index 3f71b098b..32bfba1f8 100644 --- a/examples/xo_python/sawtooth_xo/processor/config/xo.py +++ b/examples/xo_python/sawtooth_xo/processor/config/xo.py @@ -62,7 +62,7 @@ def load_toml_xo_config(filename): except IOError as e: raise LocalConfigurationError( "Unable to load transaction processor configuration file:" - " {}".format(str(e))) + " {}".format(str(e))) from e toml_config = toml.loads(raw_config) invalid_keys = set(toml_config.keys()).difference( diff --git a/examples/xo_python/sawtooth_xo/processor/xo_payload.py b/examples/xo_python/sawtooth_xo/processor/xo_payload.py index 7284d4882..3f4e66fd3 100644 --- a/examples/xo_python/sawtooth_xo/processor/xo_payload.py +++ b/examples/xo_python/sawtooth_xo/processor/xo_payload.py @@ -22,8 +22,8 @@ def __init__(self, payload): try: # The payload is csv utf-8 encoded string name, action, space = payload.decode().split(",") - except ValueError: - raise InvalidTransaction("Invalid payload serialization") + except ValueError as e: + raise InvalidTransaction("Invalid payload serialization") from e if not name: raise InvalidTransaction('Name is required') @@ -45,7 +45,7 @@ def __init__(self, payload): "Space must be an integer from 1 to 9") except ValueError: raise InvalidTransaction( - 'Space must be an integer from 1 to 9') + 'Space must be an integer from 1 to 9') from ValueError if action == 'take': space = int(space) diff --git a/examples/xo_python/sawtooth_xo/processor/xo_state.py b/examples/xo_python/sawtooth_xo/processor/xo_state.py index d7aa80fd4..b020193a4 100644 --- a/examples/xo_python/sawtooth_xo/processor/xo_state.py +++ b/examples/xo_python/sawtooth_xo/processor/xo_state.py @@ -156,8 +156,8 @@ def _deserialize(self, data): name, board, state, player1, player2 = game.split(",") games[name] = Game(name, board, state, player1, player2) - except ValueError: - raise InternalError("Failed to deserialize game data") + except ValueError as e: + raise InternalError("Failed to deserialize game data") from e return games diff --git a/examples/xo_python/sawtooth_xo/xo_client.py b/examples/xo_python/sawtooth_xo/xo_client.py index d044ffc53..895ead394 100644 --- a/examples/xo_python/sawtooth_xo/xo_client.py +++ b/examples/xo_python/sawtooth_xo/xo_client.py @@ -54,13 +54,13 @@ def __init__(self, base_url, keyfile=None): except OSError as err: raise XoException( 'Failed to read private key {}: {}'.format( - keyfile, str(err))) + keyfile, str(err))) from err try: private_key = Secp256k1PrivateKey.from_hex(private_key_str) except ParseError as e: raise XoException( - 'Unable to load private key: {}'.format(str(e))) + 'Unable to load private key: {}'.format(str(e))) from e self._signer = CryptoFactory(create_context('secp256k1')) \ .new_signer(private_key) @@ -130,7 +130,7 @@ def _get_status(self, batch_id, wait, auth_user=None, auth_password=None): auth_password=auth_password) return yaml.safe_load(result)['data'][0]['status'] except BaseException as err: - raise XoException(err) + raise XoException(err) from err def _get_prefix(self): return _sha512('xo'.encode('utf-8'))[0:6] @@ -177,10 +177,10 @@ def _send_request(self, except requests.ConnectionError as err: raise XoException( - 'Failed to connect to {}: {}'.format(url, str(err))) + 'Failed to connect to {}: {}'.format(url, str(err))) from err except BaseException as err: - raise XoException(err) + raise XoException(err) from err return result.text diff --git a/sawtooth_signing/secp256k1.py b/sawtooth_signing/secp256k1.py index e9c74577d..39e530c59 100644 --- a/sawtooth_signing/secp256k1.py +++ b/sawtooth_signing/secp256k1.py @@ -55,7 +55,8 @@ def from_hex(hex_str): try: return Secp256k1PrivateKey.from_bytes(binascii.unhexlify(hex_str)) except Exception as e: - raise ParseError('Unable to parse hex private key: {}'.format(e)) + raise ParseError('Unable to parse hex private key: {}'.format( + e)) from e @staticmethod def new_random(): @@ -91,7 +92,8 @@ def from_hex(hex_str): try: return Secp256k1PublicKey.from_bytes(binascii.unhexlify(hex_str)) except Exception as e: - raise ParseError('Unable to parse hex public key: {}'.format(e)) + raise ParseError('Unable to parse hex public key: {}'.format( + e)) from e class Secp256k1Context(Context): @@ -109,7 +111,8 @@ def sign(self, message, private_key): return signature.hex() except Exception as e: - raise SigningError('Unable to sign message: {}'.format(str(e))) + raise SigningError('Unable to sign message: {}'.format( + str(e))) from e def verify(self, signature, message, public_key): try: diff --git a/tests/sawtooth_integration/tests/integration_tools.py b/tests/sawtooth_integration/tests/integration_tools.py index c3266bf14..4c5f62f4d 100644 --- a/tests/sawtooth_integration/tests/integration_tools.py +++ b/tests/sawtooth_integration/tests/integration_tools.py @@ -143,11 +143,11 @@ def _submit_request(self, url, params=None, data=None, except requests.exceptions.HTTPError as excp: return (excp.response.status_code, excp.response.reason) except RemoteDisconnected as excp: - raise Exception(excp) + raise Exception(excp) from excp except requests.exceptions.ConnectionError as excp: raise Exception( ('Unable to connect to "{}": ' - 'make sure URL is correct').format(self.url)) + 'make sure URL is correct').format(self.url)) from excp @staticmethod def _format_queries(queries): From c4714c9fb099bf4b2a5bdb2be48aa757237ecf40 Mon Sep 17 00:00:00 2001 From: Ryan Beck-Buysse Date: Tue, 25 Aug 2020 11:01:38 -0500 Subject: [PATCH 2/4] Fix pylint R1725 errors Signed-off-by: Ryan Beck-Buysse --- .../intkey_python/sawtooth_intkey/client_cli/intkey_workload.py | 2 +- sawtooth_sdk/messaging/stream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py index 65afcea8d..d783e21d3 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py @@ -85,7 +85,7 @@ class IntKeyWorkload(Workload): """ def __init__(self, delegate, args): - super(IntKeyWorkload, self).__init__(delegate, args) + super().__init__(delegate, args) self._auth_info = args.auth_info self._urls = [] self._pending_batches = {} diff --git a/sawtooth_sdk/messaging/stream.py b/sawtooth_sdk/messaging/stream.py index 2885542ca..73a4e7d70 100644 --- a/sawtooth_sdk/messaging/stream.py +++ b/sawtooth_sdk/messaging/stream.py @@ -62,7 +62,7 @@ def __init__(self, url, futures, ready_event, error_queue): classes that the background thread of Stream is ready after a disconnect event. """ - super(_SendReceiveThread, self).__init__() + super().__init__() self._futures = futures self._url = url self._shutdown = False From 6f4959cdd0b9c5e08c729116cb684cbab78d2b6e Mon Sep 17 00:00:00 2001 From: Ryan Beck-Buysse Date: Tue, 25 Aug 2020 11:28:49 -0500 Subject: [PATCH 3/4] Fix pylint C0411 errors Signed-off-by: Ryan Beck-Buysse --- .../sawtooth_intkey/client_cli/create_batch.py | 5 ++--- .../sawtooth_intkey/client_cli/generate.py | 4 ++-- .../sawtooth_intkey/client_cli/intkey_client.py | 4 ++-- .../sawtooth_intkey/client_cli/intkey_workload.py | 10 ++++++---- .../sawtooth_intkey/client_cli/populate.py | 4 ++-- .../sawtooth_intkey/intkey_message_factory.py | 3 ++- .../intkey_python/sawtooth_intkey/processor/main.py | 3 ++- examples/intkey_python/tests/test_tp_intkey.py | 2 +- examples/xo_python/sawtooth_xo/processor/handler.py | 9 ++++----- examples/xo_python/sawtooth_xo/processor/main.py | 13 +++++++------ examples/xo_python/sawtooth_xo/xo_client.py | 4 ++-- examples/xo_python/tests/test_tp_xo.py | 2 +- 12 files changed, 33 insertions(+), 30 deletions(-) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/create_batch.py b/examples/intkey_python/sawtooth_intkey/client_cli/create_batch.py index 1718f1263..d171b195f 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/create_batch.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/create_batch.py @@ -24,15 +24,14 @@ import time import cbor +from sawtooth_intkey.processor.handler import make_intkey_address + from sawtooth_signing import create_context from sawtooth_signing import CryptoFactory from sawtooth_sdk.protobuf import batch_pb2 from sawtooth_sdk.protobuf import transaction_pb2 -from sawtooth_intkey.processor.handler import make_intkey_address - - LOGGER = logging.getLogger(__name__) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/generate.py b/examples/intkey_python/sawtooth_intkey/client_cli/generate.py index 1820bf98e..22e0e2232 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/generate.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/generate.py @@ -25,14 +25,14 @@ import cbor +from sawtooth_intkey.processor.handler import make_intkey_address + from sawtooth_signing import create_context from sawtooth_signing import CryptoFactory from sawtooth_sdk.protobuf import transaction_pb2 from sawtooth_sdk.protobuf import batch_pb2 -from sawtooth_intkey.processor.handler import make_intkey_address - LOGGER = logging.getLogger(__name__) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py index 471060011..043ff7fc6 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_client.py @@ -21,6 +21,8 @@ import yaml import cbor +from sawtooth_intkey.client_cli.exceptions import IntkeyClientException + from sawtooth_signing import create_context from sawtooth_signing import CryptoFactory from sawtooth_signing import ParseError @@ -32,8 +34,6 @@ from sawtooth_sdk.protobuf.batch_pb2 import BatchHeader from sawtooth_sdk.protobuf.batch_pb2 import Batch -from sawtooth_intkey.client_cli.exceptions import IntkeyClientException - def _sha512(data): return hashlib.sha512(data).hexdigest() diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py index d783e21d3..64e59ca1d 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/intkey_workload.py @@ -24,16 +24,18 @@ from base64 import b64encode import requests -from sawtooth_signing import create_context -from sawtooth_signing import CryptoFactory -from sawtooth_signing import ParseError -from sawtooth_signing.secp256k1 import Secp256k1PrivateKey + from sawtooth_intkey.client_cli.workload.workload_generator import \ WorkloadGenerator from sawtooth_intkey.client_cli.workload.sawtooth_workload import Workload from sawtooth_intkey.client_cli.create_batch import create_intkey_transaction from sawtooth_intkey.client_cli.create_batch import create_batch from sawtooth_intkey.client_cli.exceptions import IntKeyCliException + +from sawtooth_signing import create_context +from sawtooth_signing import CryptoFactory +from sawtooth_signing import ParseError +from sawtooth_signing.secp256k1 import Secp256k1PrivateKey from sawtooth_sdk.protobuf import batch_pb2 LOGGER = logging.getLogger(__name__) diff --git a/examples/intkey_python/sawtooth_intkey/client_cli/populate.py b/examples/intkey_python/sawtooth_intkey/client_cli/populate.py index cf56b15d1..0ffe9a48f 100644 --- a/examples/intkey_python/sawtooth_intkey/client_cli/populate.py +++ b/examples/intkey_python/sawtooth_intkey/client_cli/populate.py @@ -26,14 +26,14 @@ import cbor +from sawtooth_intkey.processor.handler import make_intkey_address + from sawtooth_signing import create_context from sawtooth_signing import CryptoFactory from sawtooth_sdk.protobuf import batch_pb2 from sawtooth_sdk.protobuf import transaction_pb2 -from sawtooth_intkey.processor.handler import make_intkey_address - LOGGER = logging.getLogger(__name__) diff --git a/examples/intkey_python/sawtooth_intkey/intkey_message_factory.py b/examples/intkey_python/sawtooth_intkey/intkey_message_factory.py index b1f9a8df1..9f32bc0d2 100644 --- a/examples/intkey_python/sawtooth_intkey/intkey_message_factory.py +++ b/examples/intkey_python/sawtooth_intkey/intkey_message_factory.py @@ -15,10 +15,11 @@ import cbor -from sawtooth_processor_test.message_factory import MessageFactory from sawtooth_intkey.processor.handler import INTKEY_ADDRESS_PREFIX from sawtooth_intkey.processor.handler import make_intkey_address +from sawtooth_processor_test.message_factory import MessageFactory + class IntkeyMessageFactory: def __init__(self, signer=None): diff --git a/examples/intkey_python/sawtooth_intkey/processor/main.py b/examples/intkey_python/sawtooth_intkey/processor/main.py index bc93e94d3..0df1c4c91 100644 --- a/examples/intkey_python/sawtooth_intkey/processor/main.py +++ b/examples/intkey_python/sawtooth_intkey/processor/main.py @@ -17,12 +17,13 @@ import argparse import pkg_resources +from sawtooth_intkey.processor.handler import IntkeyTransactionHandler + from sawtooth_sdk.processor.core import TransactionProcessor from sawtooth_sdk.processor.log import init_console_logging from sawtooth_sdk.processor.log import log_configuration from sawtooth_sdk.processor.config import get_log_config from sawtooth_sdk.processor.config import get_log_dir -from sawtooth_intkey.processor.handler import IntkeyTransactionHandler DISTRIBUTION_NAME = 'sawtooth-intkey' diff --git a/examples/intkey_python/tests/test_tp_intkey.py b/examples/intkey_python/tests/test_tp_intkey.py index c2603b8a1..26c290d46 100644 --- a/examples/intkey_python/tests/test_tp_intkey.py +++ b/examples/intkey_python/tests/test_tp_intkey.py @@ -15,9 +15,9 @@ import cbor +from sawtooth_intkey.intkey_message_factory import IntkeyMessageFactory from sawtooth_processor_test.transaction_processor_test_case \ import TransactionProcessorTestCase -from sawtooth_intkey.intkey_message_factory import IntkeyMessageFactory from sawtooth_sdk.protobuf.validator_pb2 import Message diff --git a/examples/xo_python/sawtooth_xo/processor/handler.py b/examples/xo_python/sawtooth_xo/processor/handler.py index 1a537dc71..d00082fdd 100644 --- a/examples/xo_python/sawtooth_xo/processor/handler.py +++ b/examples/xo_python/sawtooth_xo/processor/handler.py @@ -15,16 +15,15 @@ import logging - -from sawtooth_sdk.processor.handler import TransactionHandler -from sawtooth_sdk.processor.exceptions import InvalidTransaction -from sawtooth_sdk.processor.exceptions import InternalError - from sawtooth_xo.processor.xo_payload import XoPayload from sawtooth_xo.processor.xo_state import Game from sawtooth_xo.processor.xo_state import XoState from sawtooth_xo.processor.xo_state import XO_NAMESPACE +from sawtooth_sdk.processor.handler import TransactionHandler +from sawtooth_sdk.processor.exceptions import InvalidTransaction +from sawtooth_sdk.processor.exceptions import InternalError + LOGGER = logging.getLogger(__name__) diff --git a/examples/xo_python/sawtooth_xo/processor/main.py b/examples/xo_python/sawtooth_xo/processor/main.py index b554c0dc5..e5406ef5f 100644 --- a/examples/xo_python/sawtooth_xo/processor/main.py +++ b/examples/xo_python/sawtooth_xo/processor/main.py @@ -18,12 +18,6 @@ import argparse import pkg_resources -from sawtooth_sdk.processor.core import TransactionProcessor -from sawtooth_sdk.processor.log import init_console_logging -from sawtooth_sdk.processor.log import log_configuration -from sawtooth_sdk.processor.config import get_log_config -from sawtooth_sdk.processor.config import get_log_dir -from sawtooth_sdk.processor.config import get_config_dir from sawtooth_xo.processor.handler import XoTransactionHandler from sawtooth_xo.processor.config.xo import XOConfig from sawtooth_xo.processor.config.xo import \ @@ -33,6 +27,13 @@ from sawtooth_xo.processor.config.xo import \ merge_xo_config +from sawtooth_sdk.processor.core import TransactionProcessor +from sawtooth_sdk.processor.log import init_console_logging +from sawtooth_sdk.processor.log import log_configuration +from sawtooth_sdk.processor.config import get_log_config +from sawtooth_sdk.processor.config import get_log_dir +from sawtooth_sdk.processor.config import get_config_dir + DISTRIBUTION_NAME = 'sawtooth-xo' diff --git a/examples/xo_python/sawtooth_xo/xo_client.py b/examples/xo_python/sawtooth_xo/xo_client.py index 895ead394..675ac7034 100644 --- a/examples/xo_python/sawtooth_xo/xo_client.py +++ b/examples/xo_python/sawtooth_xo/xo_client.py @@ -21,6 +21,8 @@ import requests import yaml +from sawtooth_xo.xo_exceptions import XoException + from sawtooth_signing import create_context from sawtooth_signing import CryptoFactory from sawtooth_signing import ParseError @@ -32,8 +34,6 @@ from sawtooth_sdk.protobuf.batch_pb2 import BatchHeader from sawtooth_sdk.protobuf.batch_pb2 import Batch -from sawtooth_xo.xo_exceptions import XoException - def _sha512(data): return hashlib.sha512(data).hexdigest() diff --git a/examples/xo_python/tests/test_tp_xo.py b/examples/xo_python/tests/test_tp_xo.py index 4de59ab7a..e588868f9 100644 --- a/examples/xo_python/tests/test_tp_xo.py +++ b/examples/xo_python/tests/test_tp_xo.py @@ -15,9 +15,9 @@ import logging +from sawtooth_xo.xo_message_factory import XoMessageFactory from sawtooth_processor_test.transaction_processor_test_case \ import TransactionProcessorTestCase -from sawtooth_xo.xo_message_factory import XoMessageFactory LOGGER = logging.getLogger(__name__) From 06114abe4e5431064e6fdb7398b12c88aa9bf893 Mon Sep 17 00:00:00 2001 From: Ryan Beck-Buysse Date: Tue, 25 Aug 2020 15:04:06 -0500 Subject: [PATCH 4/4] Ignore W0236 errors The zmq_driver expects these to be methods, even though the class definition say they should be a property. The ZMQ test fails if these are properties. Signed-off-by: Ryan Beck-Buysse --- tests/test_zmq_driver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_zmq_driver.py b/tests/test_zmq_driver.py index 0c8d8b4d0..959776b45 100644 --- a/tests/test_zmq_driver.py +++ b/tests/test_zmq_driver.py @@ -48,9 +48,13 @@ def start(self, updates, service, startup_state): def stop(self): self.exit = True + # Ignore invalid override pylint issues + # pylint: disable=invalid-overridden-method def name(self): return 'test-name' + # Ignore invalid override pylint issues + # pylint: disable=invalid-overridden-method def version(self): return 'test-version'