mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 01:21:11 +00:00
ruff format: remaining files
This commit is contained in:
parent
fea1653e31
commit
876a8f9e3e
|
@ -9,5 +9,5 @@ To launch Freqtrade as a module
|
|||
from freqtrade import main
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
main.main()
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,7 @@
|
|||
Main Freqtrade bot script.
|
||||
Read the documentation to know what cli arguments you need.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
from typing import Any, List, Optional
|
||||
|
@ -20,7 +21,7 @@ from freqtrade.loggers import setup_logging_pre
|
|||
from freqtrade.util.gc_setup import gc_set_threshold
|
||||
|
||||
|
||||
logger = logging.getLogger('freqtrade')
|
||||
logger = logging.getLogger("freqtrade")
|
||||
|
||||
|
||||
def main(sysargv: Optional[List[str]] = None) -> None:
|
||||
|
@ -36,10 +37,10 @@ def main(sysargv: Optional[List[str]] = None) -> None:
|
|||
args = arguments.get_parsed_arg()
|
||||
|
||||
# Call subcommand.
|
||||
if 'func' in args:
|
||||
logger.info(f'freqtrade {__version__}')
|
||||
if "func" in args:
|
||||
logger.info(f"freqtrade {__version__}")
|
||||
gc_set_threshold()
|
||||
return_code = args['func'](args)
|
||||
return_code = args["func"](args)
|
||||
else:
|
||||
# No subcommand was issued.
|
||||
raise OperationalException(
|
||||
|
@ -54,19 +55,21 @@ def main(sysargv: Optional[List[str]] = None) -> None:
|
|||
except SystemExit as e: # pragma: no cover
|
||||
return_code = e
|
||||
except KeyboardInterrupt:
|
||||
logger.info('SIGINT received, aborting ...')
|
||||
logger.info("SIGINT received, aborting ...")
|
||||
return_code = 0
|
||||
except ConfigurationError as e:
|
||||
logger.error(f"Configuration error: {e}\n"
|
||||
f"Please make sure to review the documentation at {DOCS_LINK}.")
|
||||
logger.error(
|
||||
f"Configuration error: {e}\n"
|
||||
f"Please make sure to review the documentation at {DOCS_LINK}."
|
||||
)
|
||||
except FreqtradeException as e:
|
||||
logger.error(str(e))
|
||||
return_code = 2
|
||||
except Exception:
|
||||
logger.exception('Fatal exception!')
|
||||
logger.exception("Fatal exception!")
|
||||
finally:
|
||||
sys.exit(return_code)
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
|
|
|
@ -64,7 +64,7 @@ class FreqaiExampleHybridStrategy(IStrategy):
|
|||
# "120": 0.0, # exit after 120 minutes at break even
|
||||
"60": 0.01,
|
||||
"30": 0.02,
|
||||
"0": 0.04
|
||||
"0": 0.04,
|
||||
}
|
||||
|
||||
plot_config = {
|
||||
|
|
|
@ -53,7 +53,7 @@ class SampleStrategy(IStrategy):
|
|||
# "120": 0.0, # exit after 120 minutes at break even
|
||||
"60": 0.01,
|
||||
"30": 0.02,
|
||||
"0": 0.04
|
||||
"0": 0.04,
|
||||
}
|
||||
|
||||
# Optimal stoploss designed for the strategy.
|
||||
|
|
Loading…
Reference in New Issue
Block a user