copilot nitpick
This commit is contained in:
@@ -57,7 +57,7 @@ class BinanceWrapper(MarketWrapper):
|
||||
"""
|
||||
Formatta l'asset_id nel formato richiesto da Binance.
|
||||
"""
|
||||
i = asset_id.index('-')
|
||||
i = asset_id.find('-')
|
||||
if i != -1: asset_id = asset_id[:i]
|
||||
return f"{asset_id}{self.currency}" if self.currency not in asset_id else asset_id
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class CoinBaseWrapper(MarketWrapper):
|
||||
)
|
||||
|
||||
def __format(self, asset_id: str) -> str:
|
||||
i = asset_id.index('-')
|
||||
i = asset_id.find('-')
|
||||
if i != -1: asset_id = asset_id[:i]
|
||||
return f"{asset_id}-{self.currency}"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class YFinanceWrapper(MarketWrapper):
|
||||
Formatta il simbolo per yfinance.
|
||||
Per crypto, aggiunge '-' e la valuta (es. BTC -> BTC-USD).
|
||||
"""
|
||||
i = asset_id.index('-')
|
||||
i = asset_id.find('-')
|
||||
if i != -1: asset_id = asset_id[:i]
|
||||
return f"{asset_id}-{self.currency}"
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class CryptoSymbolsTools(Toolkit):
|
||||
Args:
|
||||
query (str): Query di ricerca.
|
||||
Returns:
|
||||
list[str]: Lista di simboli che contengono la query.
|
||||
list[tuple[str, str]]: Lista di tuple (simbolo, nome) che contengono la query.
|
||||
"""
|
||||
query_lower = query.lower()
|
||||
positions = self.final_table['Name'].str.lower().str.contains(query_lower)
|
||||
@@ -59,7 +59,7 @@ class CryptoSymbolsTools(Toolkit):
|
||||
if not force_refresh and not self.final_table.empty:
|
||||
return
|
||||
|
||||
num_currencies = 250 # It looks like is the max per page otherwise yahoo returns 26
|
||||
num_currencies = 250 # It looks like this is the max per page otherwise yahoo returns 26
|
||||
offset = 0
|
||||
stop = not self.final_table.empty
|
||||
table = self.final_table.copy()
|
||||
|
||||
Reference in New Issue
Block a user