mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
flake happy
This commit is contained in:
parent
94e6fb89b3
commit
7e103e34f8
|
@ -6,7 +6,6 @@ from copy import deepcopy
|
|||
from datetime import datetime
|
||||
from functools import reduce
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
from unittest.mock import MagicMock, PropertyMock
|
||||
|
||||
import arrow
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# pragma pylint: disable=missing-docstring, W0212, line-too-long, C0103, unused-argument
|
||||
|
||||
import json
|
||||
import math
|
||||
import random
|
||||
from unittest.mock import MagicMock
|
||||
|
@ -23,7 +22,7 @@ from freqtrade.state import RunMode
|
|||
from freqtrade.strategy.default_strategy import DefaultStrategy
|
||||
from freqtrade.strategy.interface import SellType
|
||||
from freqtrade.tests.conftest import (get_args, log_has, log_has_re, patch_exchange,
|
||||
patched_configuration_open)
|
||||
patched_configuration_open)
|
||||
|
||||
|
||||
def trim_dictlist(dict_list, num):
|
||||
|
@ -205,7 +204,10 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
|
||||
def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_open(mocker, default_conf)
|
||||
mocker.patch('freqtrade.configuration.configuration.Configuration._create_datadir', lambda s, c, x: x)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.Configuration._create_datadir',
|
||||
lambda s, c, x: x
|
||||
)
|
||||
|
||||
args = [
|
||||
'--config', 'config.json',
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# pragma pylint: disable=missing-docstring, C0103, C0330
|
||||
# pragma pylint: disable=protected-access, too-many-lines, invalid-name, too-many-arguments
|
||||
|
||||
import json
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from freqtrade.edge import PairInfo
|
||||
|
@ -9,7 +8,7 @@ from freqtrade.optimize import setup_configuration, start_edge
|
|||
from freqtrade.optimize.edge_cli import EdgeCli
|
||||
from freqtrade.state import RunMode
|
||||
from freqtrade.tests.conftest import (get_args, log_has, log_has_re, patch_exchange,
|
||||
patched_configuration_open)
|
||||
patched_configuration_open)
|
||||
|
||||
|
||||
def test_setup_configuration_without_arguments(mocker, default_conf, caplog) -> None:
|
||||
|
@ -46,7 +45,10 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
|
||||
def test_setup_edge_configuration_with_arguments(mocker, edge_conf, caplog) -> None:
|
||||
patched_configuration_open(mocker, edge_conf)
|
||||
mocker.patch('freqtrade.configuration.configuration.Configuration._create_datadir', lambda s, c, x: x)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.Configuration._create_datadir',
|
||||
lambda s, c, x: x
|
||||
)
|
||||
|
||||
args = [
|
||||
'--config', 'config.json',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# pragma pylint: disable=missing-docstring,W0212,C0103
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime
|
||||
from unittest.mock import MagicMock
|
||||
|
@ -17,7 +16,8 @@ from freqtrade.optimize import setup_configuration, start_hyperopt
|
|||
from freqtrade.resolvers.hyperopt_resolver import HyperOptResolver
|
||||
from freqtrade.state import RunMode
|
||||
from freqtrade.tests.conftest import (get_args, log_has, log_has_re, patch_exchange,
|
||||
patched_configuration_load_config_file, patched_configuration_open)
|
||||
patched_configuration_load_config_file,
|
||||
patched_configuration_open)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
|
@ -82,7 +82,10 @@ def test_setup_hyperopt_configuration_without_arguments(mocker, default_conf, ca
|
|||
|
||||
def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_open(mocker, default_conf)
|
||||
mocker.patch('freqtrade.configuration.configuration.Configuration._create_datadir', lambda s, c, x: x)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.Configuration._create_datadir',
|
||||
lambda s, c, x: x
|
||||
)
|
||||
|
||||
args = [
|
||||
'--config', 'config.json',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# pragma pylint: disable=missing-docstring, protected-access, invalid-name
|
||||
|
||||
import json
|
||||
import logging
|
||||
from argparse import Namespace
|
||||
from copy import deepcopy
|
||||
|
@ -83,7 +82,10 @@ def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
|
|||
config_files = [conf1, conf2]
|
||||
|
||||
configsmock = MagicMock(side_effect=config_files)
|
||||
mocker.patch('freqtrade.configuration.configuration.Configuration._load_config_file', configsmock)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.Configuration._load_config_file',
|
||||
configsmock
|
||||
)
|
||||
|
||||
arg_list = ['-c', 'test_conf.json', '--config', 'test2_conf.json', ]
|
||||
args = Arguments(arg_list, '').get_parsed_arg()
|
||||
|
@ -305,7 +307,10 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
|
||||
def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_open(mocker, default_conf)
|
||||
mocker.patch('freqtrade.configuration.configuration.Configuration._create_datadir', lambda s, c, x: x)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.Configuration._create_datadir',
|
||||
lambda s, c, x: x
|
||||
)
|
||||
|
||||
arglist = [
|
||||
'--config', 'config.json',
|
||||
|
|
|
@ -11,7 +11,7 @@ from freqtrade.freqtradebot import FreqtradeBot
|
|||
from freqtrade.main import main
|
||||
from freqtrade.state import State
|
||||
from freqtrade.tests.conftest import (log_has, patch_exchange,
|
||||
patched_configuration_load_config_file)
|
||||
patched_configuration_load_config_file)
|
||||
from freqtrade.worker import Worker
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user