Adjust imports to new place for arguments

This commit is contained in:
Matthias 2020-01-26 13:41:04 +01:00
parent 7f851ad8d9
commit a3e9d04383
9 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,6 @@
# flake8: noqa: F401
from freqtrade.commands.arguments import Arguments
from freqtrade.commands.data_commands import start_download_data
from freqtrade.commands.deploy_commands import (start_create_userdir,
start_new_hyperopt,

View File

@ -7,7 +7,7 @@ from pathlib import Path
from typing import Any, Dict, List, Optional
from freqtrade import constants
from freqtrade.configuration.cli_options import AVAILABLE_CLI_OPTIONS
from freqtrade.commands.cli_options import AVAILABLE_CLI_OPTIONS
ARGS_COMMON = ["verbosity", "logfile", "version", "config", "datadir", "user_data_dir"]

View File

@ -1,7 +1,7 @@
"""
Definition of cli arguments used in arguments.py
"""
import argparse
from argparse import ArgumentTypeError
from freqtrade import __version__, constants
@ -12,7 +12,7 @@ def check_int_positive(value: str) -> int:
if uint <= 0:
raise ValueError
except ValueError:
raise argparse.ArgumentTypeError(
raise ArgumentTypeError(
f"{value} is invalid for this parameter, should be a positive integer value"
)
return uint
@ -24,7 +24,7 @@ def check_int_nonzero(value: str) -> int:
if uint == 0:
raise ValueError
except ValueError:
raise argparse.ArgumentTypeError(
raise ArgumentTypeError(
f"{value} is invalid for this parameter, should be a non-zero integer value"
)
return uint

View File

@ -1,6 +1,5 @@
# flake8: noqa: F401
from freqtrade.configuration.arguments import Arguments
from freqtrade.configuration.check_exchange import check_exchange, remove_credentials
from freqtrade.configuration.timerange import TimeRange
from freqtrade.configuration.configuration import Configuration

View File

@ -14,7 +14,7 @@ if sys.version_info < (3, 6):
import logging
from typing import Any, List
from freqtrade.configuration import Arguments
from freqtrade.commands import Arguments
logger = logging.getLogger('freqtrade')

View File

@ -14,7 +14,7 @@ import pytest
from telegram import Chat, Message, Update
from freqtrade import constants, persistence
from freqtrade.configuration import Arguments
from freqtrade.commands import Arguments
from freqtrade.data.converter import parse_ticker_dataframe
from freqtrade.edge import Edge, PairInfo
from freqtrade.exchange import Exchange

View File

@ -5,8 +5,8 @@ from unittest.mock import MagicMock
import pytest
from freqtrade.configuration import Arguments
from freqtrade.configuration.cli_options import check_int_positive
from freqtrade.commands import Arguments
from freqtrade.commands.cli_options import check_int_positive
# Parse common command-line-arguments. Used for all tools

View File

@ -10,7 +10,8 @@ from unittest.mock import MagicMock
import pytest
from jsonschema import ValidationError
from freqtrade.configuration import (Arguments, Configuration, check_exchange,
from freqtrade.commands import Arguments
from freqtrade.configuration import (Configuration, check_exchange,
remove_credentials,
validate_config_consistency)
from freqtrade.configuration.config_validation import validate_config_schema

View File

@ -5,7 +5,7 @@ from unittest.mock import MagicMock, PropertyMock
import pytest
from freqtrade.configuration import Arguments
from freqtrade.commands import Arguments
from freqtrade.exceptions import OperationalException, FreqtradeException
from freqtrade.freqtradebot import FreqtradeBot
from freqtrade.main import main