Use Alias to type config objects
This commit is contained in:
@@ -3,7 +3,7 @@ import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from freqtrade.constants import LongShort
|
||||
from freqtrade.constants import Config, LongShort
|
||||
from freqtrade.enums import ExitType
|
||||
from freqtrade.persistence import Trade
|
||||
from freqtrade.plugins.protections import IProtection, ProtectionReturn
|
||||
@@ -17,7 +17,7 @@ class StoplossGuard(IProtection):
|
||||
has_global_stop: bool = True
|
||||
has_local_stop: bool = True
|
||||
|
||||
def __init__(self, config: Dict[str, Any], protection_config: Dict[str, Any]) -> None:
|
||||
def __init__(self, config: Config, protection_config: Dict[str, Any]) -> None:
|
||||
super().__init__(config, protection_config)
|
||||
|
||||
self._trade_limit = protection_config.get('trade_limit', 10)
|
||||
|
||||
Reference in New Issue
Block a user