Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Dec 14, 2023
1 parent 059d77d commit b9b09bd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions gsrest/db/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,6 @@ async def get_new_address(self, currency, address):
if not prefix:
return None
if is_eth_like(currency):
#address = evm_address_from_hex(currency, address)
prefix = prefix.upper()
prefix_length = self.get_prefix_lengths(currency)['address']
query = ("SELECT * FROM new_addresses "
Expand All @@ -810,7 +809,6 @@ async def get_address_id(self, currency, address):
if not prefix:
return None
if is_eth_like(currency):
#address = evm_address_from_hex(currency, address)
prefix = prefix.upper()
query = ("SELECT address_id FROM address_ids_by_address_prefix "
"WHERE address_prefix = %s AND address = %s")
Expand Down Expand Up @@ -1709,7 +1707,6 @@ async def is_address_dirty(self, currency, address):
if not prefix:
return None
if is_eth_like(currency):
#address = evm_address_from_hex(currency, address)
prefix = prefix.upper()
prefix_length = self.get_prefix_lengths(currency)['address']
query = ("SELECT address FROM dirty_addresses "
Expand Down
6 changes: 4 additions & 2 deletions gsrest/service/addresses_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ async def get_address_entity(request, currency, address):
if 'not found' not in str(e):
raise e
return await try_get_delta_update_entity_dummy(request, currency,
address_canonical, notfound)
address_canonical,
notfound)

if entity_id is None:
return await try_get_delta_update_entity_dummy(request, currency,
address_canonical, notfound)
address_canonical,
notfound)

result = await get_entity(request,
currency,
Expand Down
4 changes: 2 additions & 2 deletions gsrest/service/common_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def list_neighbors(request,


async def add_labels(request, currency, node_type, that, nodes):
def identity(x,y):
def identity(x, y):
return y
(field, tfield, fun, fmt) = \
('address', 'address', 'list_labels_for_addresses',
Expand Down Expand Up @@ -221,7 +221,7 @@ async def links_response(request, currency, result):
height=row['block_id'],
token_tx_id=row.get("token_tx_id", None),
from_address=address_to_user_format(currency,
row['from_address']),
row['from_address']),
to_address=address_to_user_format(currency,
row['to_address']),
contract_creation=row.get("contract_creation", None),
Expand Down
2 changes: 0 additions & 2 deletions gsrest/util/evm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Optional

from gsrest.util.string_edit import remove_prefix


Expand Down
2 changes: 1 addition & 1 deletion gsrest/util/tron.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def partial_tron_to_partial_evm(partial_taddress_str: str,
if (len_taddress == len_full_taddress):
return bytes_to_hex(partial_evm)
return (bytes_to_hex(partial_evm))[:len_taddress]
except Exception as e:
except Exception:
return ""


Expand Down

0 comments on commit b9b09bd

Please sign in to comment.