Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Jan 27, 2022
1 parent 042d398 commit 3712ebb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions xumm/resource/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions xumm/resource/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -251,7 +251,7 @@ async def subscribe(
# })

if payload_details:

def on_open(connection):
logger.debug(
'Payload {}: Subscription active (WebSocket opened)'
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions xumm/resource/types/meta/application_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ class Quota(XummResource):
and the value is json key in definition.
"""
nullable = {}

required = {}

model_types = {
'ratelimit': str
}
Expand Down

0 comments on commit 3712ebb

Please sign in to comment.