mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Improve some bugbear findings
This commit is contained in:
parent
6dfc34d227
commit
927c54094a
|
@ -1549,7 +1549,7 @@ class Telegram(RPCHandler):
|
|||
|
||||
async def send_blacklist_msg(self, blacklist: Dict):
|
||||
errmsgs = []
|
||||
for pair, error in blacklist['errors'].items():
|
||||
for _, error in blacklist['errors'].items():
|
||||
errmsgs.append(f"Error: {error['error_msg']}")
|
||||
if errmsgs:
|
||||
await self._send_msg('\n'.join(errmsgs))
|
||||
|
|
|
@ -64,7 +64,7 @@ def informative(timeframe: str, asset: str = '',
|
|||
def decorator(fn: PopulateIndicators):
|
||||
informative_pairs = getattr(fn, '_ft_informative', [])
|
||||
informative_pairs.append(InformativeData(_asset, _timeframe, _fmt, _ffill, _candle_type))
|
||||
setattr(fn, '_ft_informative', informative_pairs)
|
||||
setattr(fn, '_ft_informative', informative_pairs) # noqa: B010
|
||||
return fn
|
||||
return decorator
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ def print_commands():
|
|||
# Print dynamic help for the different commands using the commands doc-strings
|
||||
client = FtRestClient(None)
|
||||
print("Possible commands:\n")
|
||||
for x, y in inspect.getmembers(client):
|
||||
for x, _ in inspect.getmembers(client):
|
||||
if not x.startswith('_'):
|
||||
doc = re.sub(':return:.*', '', getattr(client, x).__doc__, flags=re.MULTILINE).rstrip()
|
||||
print(f"{x}\n\t{doc}\n")
|
||||
|
|
|
@ -201,7 +201,7 @@ async def create_client(
|
|||
token,
|
||||
scheme='ws',
|
||||
name='default',
|
||||
protocol=ClientProtocol(),
|
||||
protocol=None,
|
||||
sleep_time=10,
|
||||
ping_timeout=10,
|
||||
wait_timeout=30,
|
||||
|
@ -216,6 +216,8 @@ async def create_client(
|
|||
:param name: The name of the producer
|
||||
:param **kwargs: Any extra kwargs passed to websockets.connect
|
||||
"""
|
||||
if not protocol:
|
||||
protocol = ClientProtocol()
|
||||
|
||||
while 1:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user