flake happy

This commit is contained in:
hroff-1902 2019-07-12 01:41:09 +03:00
parent 94e6fb89b3
commit 7e103e34f8
6 changed files with 25 additions and 14 deletions

View File

@ -6,7 +6,6 @@ from copy import deepcopy
from datetime import datetime from datetime import datetime
from functools import reduce from functools import reduce
from pathlib import Path from pathlib import Path
from typing import List
from unittest.mock import MagicMock, PropertyMock from unittest.mock import MagicMock, PropertyMock
import arrow import arrow

View File

@ -1,6 +1,5 @@
# pragma pylint: disable=missing-docstring, W0212, line-too-long, C0103, unused-argument # pragma pylint: disable=missing-docstring, W0212, line-too-long, C0103, unused-argument
import json
import math import math
import random import random
from unittest.mock import MagicMock from unittest.mock import MagicMock
@ -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: def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
patched_configuration_open(mocker, default_conf) 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 = [ args = [
'--config', 'config.json', '--config', 'config.json',

View File

@ -1,7 +1,6 @@
# pragma pylint: disable=missing-docstring, C0103, C0330 # pragma pylint: disable=missing-docstring, C0103, C0330
# pragma pylint: disable=protected-access, too-many-lines, invalid-name, too-many-arguments # pragma pylint: disable=protected-access, too-many-lines, invalid-name, too-many-arguments
import json
from unittest.mock import MagicMock from unittest.mock import MagicMock
from freqtrade.edge import PairInfo from freqtrade.edge import PairInfo
@ -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: def test_setup_edge_configuration_with_arguments(mocker, edge_conf, caplog) -> None:
patched_configuration_open(mocker, edge_conf) 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 = [ args = [
'--config', 'config.json', '--config', 'config.json',

View File

@ -1,5 +1,4 @@
# pragma pylint: disable=missing-docstring,W0212,C0103 # pragma pylint: disable=missing-docstring,W0212,C0103
import json
import os import os
from datetime import datetime from datetime import datetime
from unittest.mock import MagicMock 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.resolvers.hyperopt_resolver import HyperOptResolver
from freqtrade.state import RunMode from freqtrade.state import RunMode
from freqtrade.tests.conftest import (get_args, log_has, log_has_re, patch_exchange, 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') @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: def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
patched_configuration_open(mocker, default_conf) 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 = [ args = [
'--config', 'config.json', '--config', 'config.json',

View File

@ -1,6 +1,5 @@
# pragma pylint: disable=missing-docstring, protected-access, invalid-name # pragma pylint: disable=missing-docstring, protected-access, invalid-name
import json
import logging import logging
from argparse import Namespace from argparse import Namespace
from copy import deepcopy from copy import deepcopy
@ -83,7 +82,10 @@ def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
config_files = [conf1, conf2] config_files = [conf1, conf2]
configsmock = MagicMock(side_effect=config_files) 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', ] arg_list = ['-c', 'test_conf.json', '--config', 'test2_conf.json', ]
args = Arguments(arg_list, '').get_parsed_arg() 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: def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> None:
patched_configuration_open(mocker, default_conf) 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 = [ arglist = [
'--config', 'config.json', '--config', 'config.json',