mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Improve typing
This commit is contained in:
parent
68f67c5ae8
commit
9b10287899
|
@ -13,7 +13,7 @@ from schedule import Scheduler
|
|||
|
||||
from freqtrade import constants
|
||||
from freqtrade.configuration import validate_config_consistency
|
||||
from freqtrade.constants import BuySell, Config, LongShort
|
||||
from freqtrade.constants import BuySell, Config, ExchangeConfig, LongShort
|
||||
from freqtrade.data.converter import order_book_to_dataframe
|
||||
from freqtrade.data.dataprovider import DataProvider
|
||||
from freqtrade.edge import Edge
|
||||
|
@ -64,7 +64,7 @@ class FreqtradeBot(LoggingMixin):
|
|||
|
||||
# Init objects
|
||||
self.config = config
|
||||
exchange_config = deepcopy(config['exchange'])
|
||||
exchange_config: ExchangeConfig = deepcopy(config['exchange'])
|
||||
# Remove credentials from original exchange config to avoid accidental credentail exposure
|
||||
remove_exchange_credentials(config['exchange'], True)
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
This module loads custom exchanges
|
||||
"""
|
||||
import logging
|
||||
from typing import Any, Dict, Optional
|
||||
from typing import Optional
|
||||
|
||||
import freqtrade.exchange as exchanges
|
||||
from freqtrade.constants import Config
|
||||
from freqtrade.constants import Config, ExchangeConfig
|
||||
from freqtrade.exchange import MAP_EXCHANGE_CHILDCLASS, Exchange
|
||||
from freqtrade.resolvers import IResolver
|
||||
|
||||
|
@ -20,7 +20,7 @@ class ExchangeResolver(IResolver):
|
|||
object_type = Exchange
|
||||
|
||||
@staticmethod
|
||||
def load_exchange(config: Config, *, exchange_config: Optional[Dict[str, Any]] = None,
|
||||
def load_exchange(config: Config, *, exchange_config: Optional[ExchangeConfig] = None,
|
||||
validate: bool = True, load_leverage_tiers: bool = False) -> Exchange:
|
||||
"""
|
||||
Load the custom class from config parameter
|
||||
|
|
Loading…
Reference in New Issue
Block a user