Flake8 for scripts
This commit is contained in:
parent
6312d785d8
commit
184b13f2fb
@ -39,7 +39,7 @@ jobs:
|
|||||||
- cp config.json.example config.json
|
- cp config.json.example config.json
|
||||||
- python freqtrade/main.py --datadir freqtrade/tests/testdata hyperopt -e 5
|
- python freqtrade/main.py --datadir freqtrade/tests/testdata hyperopt -e 5
|
||||||
name: hyperopt
|
name: hyperopt
|
||||||
- script: flake8 freqtrade
|
- script: flake8 freqtrade scripts
|
||||||
name: flake8
|
name: flake8
|
||||||
- script: mypy freqtrade
|
- script: mypy freqtrade
|
||||||
name: mypy
|
name: mypy
|
||||||
|
@ -51,7 +51,6 @@ try:
|
|||||||
|
|
||||||
id = sys.argv[1] # get exchange id from command line arguments
|
id = sys.argv[1] # get exchange id from command line arguments
|
||||||
|
|
||||||
|
|
||||||
# check if the exchange is supported by ccxt
|
# check if the exchange is supported by ccxt
|
||||||
exchange_found = id in ccxt.exchanges
|
exchange_found = id in ccxt.exchanges
|
||||||
|
|
||||||
@ -90,4 +89,3 @@ except Exception as e:
|
|||||||
dump('[' + type(e).__name__ + ']', str(e))
|
dump('[' + type(e).__name__ + ']', str(e))
|
||||||
dump("Usage: python " + sys.argv[0], green('id'))
|
dump("Usage: python " + sys.argv[0], green('id'))
|
||||||
print_supported_exchanges()
|
print_supported_exchanges()
|
||||||
|
|
||||||
|
@ -24,24 +24,22 @@ Example of usage:
|
|||||||
> python3 scripts/plot_dataframe.py --pairs BTC/EUR,XRP/BTC -d user_data/data/
|
> python3 scripts/plot_dataframe.py --pairs BTC/EUR,XRP/BTC -d user_data/data/
|
||||||
--indicators1 sma,ema3 --indicators2 fastk,fastd
|
--indicators1 sma,ema3 --indicators2 fastk,fastd
|
||||||
"""
|
"""
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Any
|
from typing import Any, Dict, List
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import plotly.graph_objs as go
|
import plotly.graph_objs as go
|
||||||
import pytz
|
import pytz
|
||||||
|
|
||||||
from plotly import tools
|
from plotly import tools
|
||||||
from plotly.offline import plot
|
from plotly.offline import plot
|
||||||
|
|
||||||
from freqtrade import persistence
|
from freqtrade import persistence
|
||||||
from freqtrade.arguments import Arguments, TimeRange
|
from freqtrade.arguments import Arguments, TimeRange
|
||||||
from freqtrade.data import history
|
from freqtrade.data import history
|
||||||
from freqtrade.data.btanalysis import load_backtest_data, BT_DATA_COLUMNS
|
from freqtrade.data.btanalysis import BT_DATA_COLUMNS, load_backtest_data
|
||||||
from freqtrade.exchange import Exchange
|
from freqtrade.exchange import Exchange
|
||||||
from freqtrade.optimize.backtesting import setup_configuration
|
from freqtrade.optimize.backtesting import setup_configuration
|
||||||
from freqtrade.persistence import Trade
|
from freqtrade.persistence import Trade
|
||||||
|
@ -12,26 +12,24 @@ Optional Cli parameters
|
|||||||
--timerange: specify what timerange of data to use
|
--timerange: specify what timerange of data to use
|
||||||
--export-filename: Specify where the backtest export is located.
|
--export-filename: Specify where the backtest export is located.
|
||||||
"""
|
"""
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import json
|
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
import numpy as np
|
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import plotly.graph_objs as go
|
||||||
from plotly import tools
|
from plotly import tools
|
||||||
from plotly.offline import plot
|
from plotly.offline import plot
|
||||||
import plotly.graph_objs as go
|
|
||||||
|
|
||||||
|
from freqtrade import constants, misc
|
||||||
from freqtrade.arguments import Arguments
|
from freqtrade.arguments import Arguments
|
||||||
from freqtrade.configuration import Configuration
|
from freqtrade.configuration import Configuration
|
||||||
from freqtrade import constants
|
|
||||||
from freqtrade.data import history
|
from freqtrade.data import history
|
||||||
from freqtrade.resolvers import StrategyResolver
|
from freqtrade.resolvers import StrategyResolver
|
||||||
from freqtrade.state import RunMode
|
from freqtrade.state import RunMode
|
||||||
import freqtrade.misc as misc
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user