mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
chore: remove rapidjson from "default" imports
This commit is contained in:
parent
672a23dbcd
commit
ed5c929b23
|
@ -3,8 +3,6 @@ import logging
|
|||
import sys
|
||||
from typing import Any, Dict, List, Union
|
||||
|
||||
import rapidjson
|
||||
|
||||
from freqtrade.enums import RunMode
|
||||
from freqtrade.exceptions import ConfigurationError, OperationalException
|
||||
from freqtrade.ft_types import ValidExchangesType
|
||||
|
@ -297,6 +295,8 @@ def start_list_markets(args: Dict[str, Any], pairs_only: bool = False) -> None:
|
|||
elif args.get("print_one_column", False):
|
||||
print("\n".join(pairs.keys()))
|
||||
elif args.get("list_pairs_print_json", False):
|
||||
import rapidjson
|
||||
|
||||
print(rapidjson.dumps(list(pairs.keys()), default=str))
|
||||
elif args.get("print_csv", False):
|
||||
writer = csv.DictWriter(sys.stdout, fieldnames=headers)
|
||||
|
|
|
@ -146,7 +146,7 @@ def test_load_backtest_data_multi(testdatadir):
|
|||
def test_load_trades_from_db(default_conf, fee, is_short, mocker):
|
||||
create_mock_trades(fee, is_short)
|
||||
# remove init so it does not init again
|
||||
init_mock = mocker.patch("freqtrade.persistence.init_db", MagicMock())
|
||||
init_mock = mocker.patch("freqtrade.data.btanalysis.init_db", MagicMock())
|
||||
|
||||
trades = load_trades_from_db(db_url=default_conf["db_url"])
|
||||
assert init_mock.call_count == 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user