Autopep8 formatting
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
"stake_currency": "BTC",
|
||||
"stake_amount": 0.05,
|
||||
"fiat_display_currency": "USD", // C++-style comment
|
||||
"amount_reserve_percent" : 0.05, // And more, tabs before this comment
|
||||
"fiat_display_currency": "USD", // C++-style comment
|
||||
"amount_reserve_percent": 0.05, // And more, tabs before this comment
|
||||
"dry_run": false,
|
||||
"timeframe": "5m",
|
||||
"trailing_stop": false,
|
||||
@@ -15,15 +15,15 @@
|
||||
"trailing_stop_positive_offset": 0.0051,
|
||||
"trailing_only_offset_is_reached": false,
|
||||
"minimal_roi": {
|
||||
"40": 0.0,
|
||||
"30": 0.01,
|
||||
"20": 0.02,
|
||||
"0": 0.04
|
||||
"40": 0.0,
|
||||
"30": 0.01,
|
||||
"20": 0.02,
|
||||
"0": 0.04
|
||||
},
|
||||
"stoploss": -0.10,
|
||||
"unfilledtimeout": {
|
||||
"buy": 10,
|
||||
"sell": 30, // Trailing comma should also be accepted now
|
||||
"sell": 30, // Trailing comma should also be accepted now
|
||||
},
|
||||
"bid_strategy": {
|
||||
"use_order_book": false,
|
||||
@@ -34,7 +34,7 @@
|
||||
"bids_to_ask_delta": 1
|
||||
}
|
||||
},
|
||||
"ask_strategy":{
|
||||
"ask_strategy": {
|
||||
"use_order_book": false,
|
||||
"order_book_min": 1,
|
||||
"order_book_max": 9
|
||||
@@ -64,7 +64,9 @@
|
||||
"key": "your_exchange_key",
|
||||
"secret": "your_exchange_secret",
|
||||
"password": "",
|
||||
"ccxt_config": {"enableRateLimit": true},
|
||||
"ccxt_config": {
|
||||
"enableRateLimit": true
|
||||
},
|
||||
"ccxt_async_config": {
|
||||
"enableRateLimit": false,
|
||||
"rateLimit": 500,
|
||||
@@ -103,8 +105,8 @@
|
||||
"remove_pumps": false
|
||||
},
|
||||
"telegram": {
|
||||
// We can now comment out some settings
|
||||
// "enabled": true,
|
||||
// We can now comment out some settings
|
||||
// "enabled": true,
|
||||
"enabled": false,
|
||||
"token": "your_telegram_token",
|
||||
"chat_id": "your_telegram_chat_id"
|
||||
@@ -124,4 +126,4 @@
|
||||
},
|
||||
"strategy": "DefaultStrategy",
|
||||
"strategy_path": "user_data/strategies/"
|
||||
}
|
||||
}
|
@@ -399,7 +399,7 @@ def test_hyperopt_format_results(hyperopt):
|
||||
'rejected_signals': 2,
|
||||
'backtest_start_time': 1619718665,
|
||||
'backtest_end_time': 1619718665,
|
||||
}
|
||||
}
|
||||
results_metrics = generate_strategy_stats({'XRP/BTC': None}, '', bt_result,
|
||||
Arrow(2017, 11, 14, 19, 32, 00),
|
||||
Arrow(2017, 12, 14, 19, 32, 00), market_change=0)
|
||||
|
@@ -93,7 +93,7 @@ def test_stoploss_guard(mocker, default_conf, fee, caplog):
|
||||
Trade.query.session.add(generate_mock_trade(
|
||||
'XRP/BTC', fee.return_value, False, sell_reason=SellType.STOP_LOSS.value,
|
||||
min_ago_open=200, min_ago_close=30,
|
||||
))
|
||||
))
|
||||
|
||||
assert not freqtrade.protections.global_stop()
|
||||
assert not log_has_re(message, caplog)
|
||||
@@ -150,7 +150,7 @@ def test_stoploss_guard_perpair(mocker, default_conf, fee, caplog, only_per_pair
|
||||
Trade.query.session.add(generate_mock_trade(
|
||||
pair, fee.return_value, False, sell_reason=SellType.STOP_LOSS.value,
|
||||
min_ago_open=200, min_ago_close=30, profit_rate=0.9,
|
||||
))
|
||||
))
|
||||
|
||||
assert not freqtrade.protections.stop_per_pair(pair)
|
||||
assert not freqtrade.protections.global_stop()
|
||||
|
@@ -139,9 +139,9 @@ def test_fiat_too_many_requests_response(mocker, caplog):
|
||||
assert length_cryptomap == 0
|
||||
assert fiat_convert._backoff > datetime.datetime.now().timestamp()
|
||||
assert log_has(
|
||||
'Too many requests for Coingecko API, backing off and trying again later.',
|
||||
caplog
|
||||
)
|
||||
'Too many requests for Coingecko API, backing off and trying again later.',
|
||||
caplog
|
||||
)
|
||||
|
||||
|
||||
def test_fiat_invalid_response(mocker, caplog):
|
||||
|
@@ -942,7 +942,7 @@ def test_api_whitelist(botclient):
|
||||
"whitelist": ['ETH/BTC', 'LTC/BTC', 'XRP/BTC', 'NEO/BTC'],
|
||||
"length": 4,
|
||||
"method": ["StaticPairList"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def test_api_forcebuy(botclient, mocker, fee):
|
||||
@@ -1033,7 +1033,7 @@ def test_api_forcebuy(botclient, mocker, fee):
|
||||
'buy_tag': None,
|
||||
'timeframe': 5,
|
||||
'exchange': 'binance',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def test_api_forcesell(botclient, mocker, ticker, fee, markets):
|
||||
@@ -1215,7 +1215,7 @@ def test_api_strategies(botclient):
|
||||
'DefaultStrategy',
|
||||
'HyperoptableStrategy',
|
||||
'TestStrategyLegacy'
|
||||
]}
|
||||
]}
|
||||
|
||||
|
||||
def test_api_strategy(botclient):
|
||||
|
@@ -125,7 +125,7 @@ def test_parse_args_backtesting_custom() -> None:
|
||||
'--strategy-list',
|
||||
'DefaultStrategy',
|
||||
'SampleStrategy'
|
||||
]
|
||||
]
|
||||
call_args = Arguments(args).get_parsed_arg()
|
||||
assert call_args['config'] == ['test_conf.json']
|
||||
assert call_args['verbosity'] == 0
|
||||
|
@@ -1130,17 +1130,17 @@ def test_pairlist_resolving_fallback(mocker):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("setting", [
|
||||
("ask_strategy", "use_sell_signal", True,
|
||||
None, "use_sell_signal", False),
|
||||
("ask_strategy", "sell_profit_only", True,
|
||||
None, "sell_profit_only", False),
|
||||
("ask_strategy", "sell_profit_offset", 0.1,
|
||||
None, "sell_profit_offset", 0.01),
|
||||
("ask_strategy", "ignore_roi_if_buy_signal", True,
|
||||
None, "ignore_roi_if_buy_signal", False),
|
||||
("ask_strategy", "ignore_buying_expired_candle_after", 5,
|
||||
None, "ignore_buying_expired_candle_after", 6),
|
||||
])
|
||||
("ask_strategy", "use_sell_signal", True,
|
||||
None, "use_sell_signal", False),
|
||||
("ask_strategy", "sell_profit_only", True,
|
||||
None, "sell_profit_only", False),
|
||||
("ask_strategy", "sell_profit_offset", 0.1,
|
||||
None, "sell_profit_offset", 0.01),
|
||||
("ask_strategy", "ignore_roi_if_buy_signal", True,
|
||||
None, "ignore_roi_if_buy_signal", False),
|
||||
("ask_strategy", "ignore_buying_expired_candle_after", 5,
|
||||
None, "ignore_buying_expired_candle_after", 6),
|
||||
])
|
||||
def test_process_temporary_deprecated_settings(mocker, default_conf, setting, caplog):
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
|
||||
@@ -1180,10 +1180,10 @@ def test_process_temporary_deprecated_settings(mocker, default_conf, setting, ca
|
||||
|
||||
|
||||
@pytest.mark.parametrize("setting", [
|
||||
("experimental", "use_sell_signal", False),
|
||||
("experimental", "sell_profit_only", True),
|
||||
("experimental", "ignore_roi_if_buy_signal", True),
|
||||
])
|
||||
("experimental", "use_sell_signal", False),
|
||||
("experimental", "sell_profit_only", True),
|
||||
("experimental", "ignore_roi_if_buy_signal", True),
|
||||
])
|
||||
def test_process_removed_settings(mocker, default_conf, setting):
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
|
||||
|
Reference in New Issue
Block a user