Follow PEP 484 - no implicit optionals

This commit is contained in:
Matthias
2023-01-21 15:01:56 +01:00
parent bb355cfac5
commit 8108a48f39
24 changed files with 80 additions and 67 deletions

View File

@@ -23,7 +23,8 @@ logger = logging.getLogger(__name__)
class PairListManager(LoggingMixin):
def __init__(self, exchange, config: Config, dataprovider: DataProvider = None) -> None:
def __init__(
self, exchange, config: Config, dataprovider: Optional[DataProvider] = None) -> None:
self._exchange = exchange
self._config = config
self._whitelist = self._config['exchange'].get('pair_whitelist')
@@ -153,7 +154,8 @@ class PairListManager(LoggingMixin):
return []
return whitelist
def create_pair_list(self, pairs: List[str], timeframe: str = None) -> ListPairsWithTimeframes:
def create_pair_list(
self, pairs: List[str], timeframe: Optional[str] = None) -> ListPairsWithTimeframes:
"""
Create list of pair tuples with (pair, timeframe)
"""