From 3712ebb502f948830b985f38cd061168ebfbf5bb Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Thu, 27 Jan 2022 18:53:03 -0500 Subject: [PATCH] linter --- xumm/resource/__init__.py | 10 +++++----- xumm/resource/payload.py | 8 ++++---- xumm/resource/types/meta/application_details.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xumm/resource/__init__.py b/xumm/resource/__init__.py index 4f2aaf8..cb3515f 100644 --- a/xumm/resource/__init__.py +++ b/xumm/resource/__init__.py @@ -65,8 +65,8 @@ def sanity_check(cls, kwargs) -> None: raise ValueError( "Invalid value: {} for `{}`, " "must be a `{}` found: {}".format( - value, - attr, + value, + attr, is_type, type(value) ) @@ -143,13 +143,13 @@ def __repr__(self) -> str: def __eq__(self, other) -> bool: """Returns true if both objects are equal""" - + if type(other) != type(self): return False - + if isinstance(self, list): return self == other - + return self.__dict__ == other.__dict__ def __ne__(self, other) -> bool: diff --git a/xumm/resource/payload.py b/xumm/resource/payload.py index 3ab653a..0864b44 100644 --- a/xumm/resource/payload.py +++ b/xumm/resource/payload.py @@ -178,8 +178,8 @@ def create( :rtype: XummPostPayloadResponse """ direct_tx = 'TransactionType' in payload and 'txjson' not in payload - clone_payload = { 'txjson': payload } if direct_tx else payload - + clone_payload = {'txjson': payload} if direct_tx else payload + if not return_errors: try: res = client.post(cls.post_url(), clone_payload) @@ -251,7 +251,7 @@ async def subscribe( # }) if payload_details: - + def on_open(connection): logger.debug( 'Payload {}: Subscription active (WebSocket opened)' @@ -290,7 +290,7 @@ def on_close(): 'Payload {}: Subscription ended (WebSocket closed)' .format(payload_details.meta.uuid) ) - + cls._callback = callback cls._conn = WSClient( log_level=logging.DEBUG if env == 'sandbox' else logging.ERROR, diff --git a/xumm/resource/types/meta/application_details.py b/xumm/resource/types/meta/application_details.py index 9ea2365..45c584b 100644 --- a/xumm/resource/types/meta/application_details.py +++ b/xumm/resource/types/meta/application_details.py @@ -247,9 +247,9 @@ class Quota(XummResource): and the value is json key in definition. """ nullable = {} - + required = {} - + model_types = { 'ratelimit': str }