Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgerpodger committed Jan 5, 2024
1 parent 889ddad commit 00c6d3d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pycodestyle]

max-line-length = 120
ignore = E501, W605, W503, E127, E128
ignore = E501, W605, W503, E127, E128, E721
exclude = env/*
4 changes: 0 additions & 4 deletions src/staketaxcsv/common/ibc/MsgInfoIBC.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ def amount_currency(self, amount_string):

amount, currency = self.amount_currency_single(amount_raw, currency_raw)

# Convert from raw string to float amount and currency symbol
#amount, currency = MsgInfoIBC.amount_currency_from_raw(
# amount_raw, currency_raw, self.lcd_node, self.ibc_addresses)

out.append((amount, currency))

return out
Expand Down
2 changes: 1 addition & 1 deletion src/staketaxcsv/common/ibc/api_lcd_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_txs(self, wallet_address, events_type, page=1, limit=TXS_LIMIT_PER_QUERY

def _get_txs_one_by_one(self, wallet_address, events_type, page, limit, sleep_seconds):
""" Rewrites original query by retrieving set of txs one-by-one. """
p_start = (page-1) * limit + 1
p_start = (page - 1) * limit + 1
p_end = page * limit

elems = []
Expand Down
7 changes: 4 additions & 3 deletions src/staketaxcsv/common/ibc/api_mintscan_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"STRD": "stride",
}


class MintscanAPI:
""" Mintscan API for fetching transaction data """
session = requests.Session()
Expand Down Expand Up @@ -103,15 +104,15 @@ def get_txs_all(ticker, address, max_txs, progress=None, from_date=None, to_date
progress.report_message(f"Starting fetch stage ...")
for i in range(max_pages):
logging.info("Fetching mintscan page %i for address=%s using search_after=%s, from_date=%s, to_date=%s",
i+1, address, search_after, from_date, to_date)
i + 1, address, search_after, from_date, to_date)

elems, search_after, is_last_page = api.get_txs(
address, search_after, limit=TXS_LIMIT_PER_QUERY, from_date=from_date, to_date=to_date)
out.extend(elems)

if progress:
message = f"Fetched page {i+1} ..."
progress.report(i+1, message)
message = f"Fetched page {i + 1} ..."
progress.report(i + 1, message)

if is_last_page:
break
Expand Down
4 changes: 0 additions & 4 deletions src/staketaxcsv/luna1/util_terra.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ def _transfers_log(log, wallet_address, multicurrency=False):
if k == "sender":
sender = v

#recipient = attributes[i]["value"]
#sender = attributes[i + 1]["value"]
#amount_string = attributes[i + 2]["value"]

if recipient == wallet_address:
if multicurrency:
for amount, currency in _amounts(amount_string):
Expand Down
2 changes: 1 addition & 1 deletion src/staketaxcsv/settings_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
TORI_NODE = os.environ.get("STAKETAX_TORI_NODE", "")
LUNA2_NODE = os.environ.get("STAKETAX_LUNA2_NODE", "https://phoenix-lcd.terra.dev")

########### Optional environment variables ########################################################
# ########## Optional environment variables ########################################################

SOL_REWARDS_DB_READ = os.environ.get("STAKETAX_SOL_REWARDS_DB_READ", False)
MINTSCAN_KEY = os.environ.get("STAKETAX_MINTSCAN_KEY", "")
Expand Down
1 change: 0 additions & 1 deletion src/staketaxcsv/sol/api_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def _fetch(cls, method, params_list):

return result


@classmethod
def fetch_account(cls, address):
params_list = [address, {"encoding": "jsonParsed"}]
Expand Down

0 comments on commit 00c6d3d

Please sign in to comment.