Merge pull request #3359 from freqtrade/fix_typing
Fix typing circular dependency
This commit is contained in:
		| @@ -3,6 +3,9 @@ | |||||||
| """ | """ | ||||||
| bot constants | bot constants | ||||||
| """ | """ | ||||||
|  | from typing import List, Tuple | ||||||
|  |  | ||||||
|  |  | ||||||
| DEFAULT_CONFIG = 'config.json' | DEFAULT_CONFIG = 'config.json' | ||||||
| DEFAULT_EXCHANGE = 'bittrex' | DEFAULT_EXCHANGE = 'bittrex' | ||||||
| PROCESS_THROTTLE_SECS = 5  # sec | PROCESS_THROTTLE_SECS = 5  # sec | ||||||
| @@ -329,3 +332,6 @@ CANCEL_REASON = { | |||||||
|     "ALL_CANCELLED": "cancelled (all unfilled and partially filled open orders cancelled)", |     "ALL_CANCELLED": "cancelled (all unfilled and partially filled open orders cancelled)", | ||||||
|     "CANCELLED_ON_EXCHANGE": "cancelled on exchange", |     "CANCELLED_ON_EXCHANGE": "cancelled on exchange", | ||||||
| } | } | ||||||
|  |  | ||||||
|  | # List of pairs with their timeframes | ||||||
|  | ListPairsWithTimeframes = List[Tuple[str, str]] | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ from freqtrade.data.history import load_pair_history | |||||||
| from freqtrade.exceptions import DependencyException, OperationalException | from freqtrade.exceptions import DependencyException, OperationalException | ||||||
| from freqtrade.exchange import Exchange | from freqtrade.exchange import Exchange | ||||||
| from freqtrade.state import RunMode | from freqtrade.state import RunMode | ||||||
| from freqtrade.typing import ListPairsWithTimeframes | from freqtrade.constants import ListPairsWithTimeframes | ||||||
|  |  | ||||||
|  |  | ||||||
| logger = logging.getLogger(__name__) | logger = logging.getLogger(__name__) | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ from freqtrade.exceptions import (DependencyException, InvalidOrderException, | |||||||
|                                   OperationalException, TemporaryError) |                                   OperationalException, TemporaryError) | ||||||
| from freqtrade.exchange.common import BAD_EXCHANGES, retrier, retrier_async | from freqtrade.exchange.common import BAD_EXCHANGES, retrier, retrier_async | ||||||
| from freqtrade.misc import deep_merge_dicts, safe_value_fallback | from freqtrade.misc import deep_merge_dicts, safe_value_fallback | ||||||
| from freqtrade.typing import ListPairsWithTimeframes | from freqtrade.constants import ListPairsWithTimeframes | ||||||
|  |  | ||||||
| CcxtModuleType = Any | CcxtModuleType = Any | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ from cachetools import TTLCache, cached | |||||||
| from freqtrade.exceptions import OperationalException | from freqtrade.exceptions import OperationalException | ||||||
| from freqtrade.pairlist.IPairList import IPairList | from freqtrade.pairlist.IPairList import IPairList | ||||||
| from freqtrade.resolvers import PairListResolver | from freqtrade.resolvers import PairListResolver | ||||||
| from freqtrade.typing import ListPairsWithTimeframes | from freqtrade.constants import ListPairsWithTimeframes | ||||||
|  |  | ||||||
|  |  | ||||||
| logger = logging.getLogger(__name__) | logger = logging.getLogger(__name__) | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ from freqtrade.exceptions import StrategyError | |||||||
| from freqtrade.exchange import timeframe_to_minutes | from freqtrade.exchange import timeframe_to_minutes | ||||||
| from freqtrade.persistence import Trade | from freqtrade.persistence import Trade | ||||||
| from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper | from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper | ||||||
| from freqtrade.typing import ListPairsWithTimeframes | from freqtrade.constants import ListPairsWithTimeframes | ||||||
| from freqtrade.wallets import Wallets | from freqtrade.wallets import Wallets | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,8 +0,0 @@ | |||||||
| """ |  | ||||||
| Common Freqtrade types |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from typing import List, Tuple |  | ||||||
|  |  | ||||||
| # List of pairs with their timeframes |  | ||||||
| ListPairsWithTimeframes = List[Tuple[str, str]] |  | ||||||
		Reference in New Issue
	
	Block a user