Sort imports

This commit is contained in:
Matthias 2020-10-27 08:09:18 +01:00
parent 6c913fa617
commit 5c8779b155
2 changed files with 6 additions and 7 deletions

View File

@ -22,7 +22,7 @@ from freqtrade.exceptions import (DependencyException, ExchangeError, Insufficie
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.misc import safe_value_fallback, safe_value_fallback2
from freqtrade.pairlist.pairlistmanager import PairListManager
from freqtrade.persistence import Order, Trade, cleanup_db, init_db, PairLocks
from freqtrade.persistence import Order, PairLocks, Trade, cleanup_db, init_db
from freqtrade.resolvers import ExchangeResolver, StrategyResolver
from freqtrade.rpc import RPCManager, RPCMessageType
from freqtrade.state import State

View File

@ -1,11 +1,9 @@
import logging
from datetime import datetime, timezone
from typing import List, Optional
from freqtrade.persistence.models import PairLock
from freqtrade.exchange import timeframe_to_next_date
from freqtrade.persistence.models import PairLock
logger = logging.getLogger(__name__)
@ -13,8 +11,9 @@ logger = logging.getLogger(__name__)
class PairLocks():
"""
Pairlocks intermediate class
Pairlocks middleware class
Abstracts the database layer away so it becomes optional - which will be necessary to support
backtesting and hyperopt in the future.
"""
use_db = True
@ -43,7 +42,7 @@ class PairLocks():
Get all currently active locks for this pair
:param pair: Pair to check for. Returns all current locks if pair is empty
:param now: Datetime object (generated via datetime.now(timezone.utc)).
defaults to datetime.utcnow()
defaults to datetime.now(timezone.utc)
"""
if not now:
now = datetime.now(timezone.utc)