sort imports

This commit is contained in:
Janne Sinivirta 2018-01-10 09:51:36 +02:00
parent 0abc30401c
commit 86db6c9084
16 changed files with 50 additions and 46 deletions

View File

@ -4,14 +4,14 @@ Functions to analyze ticker data with indicators and produce buy and sell signal
import logging import logging
from datetime import timedelta from datetime import timedelta
from enum import Enum from enum import Enum
from typing import List, Dict from typing import Dict, List
import arrow import arrow
import talib.abstract as ta import talib.abstract as ta
from pandas import DataFrame, to_datetime from pandas import DataFrame, to_datetime
from freqtrade.exchange import get_ticker_history
import freqtrade.vendor.qtpylib.indicators as qtpylib import freqtrade.vendor.qtpylib.indicators as qtpylib
from freqtrade.exchange import get_ticker_history
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -1,7 +1,8 @@
import logging import logging
from typing import List, Dict, Optional from typing import Dict, List, Optional
from bittrex.bittrex import Bittrex as _Bittrex, API_V2_0, API_V1_1 from bittrex.bittrex import Bittrex as _Bittrex
from bittrex.bittrex import API_V1_1, API_V2_0
from requests.exceptions import ContentDecodingError from requests.exceptions import ContentDecodingError
from freqtrade import OperationalException from freqtrade import OperationalException

View File

@ -1,5 +1,5 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import List, Dict, Optional from typing import Dict, List, Optional
class Exchange(ABC): class Exchange(ABC):

View File

@ -1,5 +1,6 @@
import logging import logging
import time import time
from pymarketcap import Pymarketcap from pymarketcap import Pymarketcap
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -5,21 +5,21 @@ import logging
import sys import sys
import time import time
import traceback import traceback
import arrow
from datetime import datetime from datetime import datetime
from typing import Dict, Optional, List from typing import Dict, List, Optional
import arrow
import requests import requests
from requests.adapters import TimeoutSauce from requests.adapters import TimeoutSauce
from cachetools import cached, TTLCache from cachetools import cached, TTLCache
from freqtrade import __version__, exchange, persistence, rpc, DependencyException, \ from freqtrade import (DependencyException, OperationalException, __version__,
OperationalException exchange, persistence, rpc)
from freqtrade.analyze import get_signal, SignalType from freqtrade.analyze import SignalType, get_signal
from freqtrade.misc import State, get_state, update_state, parse_args, throttle, \
load_config
from freqtrade.persistence import Trade
from freqtrade.fiat_convert import CryptoToFiatConverter from freqtrade.fiat_convert import CryptoToFiatConverter
from freqtrade.misc import (State, get_state, load_config, parse_args,
throttle, update_state)
from freqtrade.persistence import Trade
logger = logging.getLogger('freqtrade') logger = logging.getLogger('freqtrade')

View File

@ -3,10 +3,10 @@ import enum
import json import json
import logging import logging
import time import time
from typing import Any, Callable, List, Dict from typing import Any, Callable, Dict, List
from jsonschema import validate, Draft4Validator from jsonschema import Draft4Validator, validate
from jsonschema.exceptions import best_match, ValidationError from jsonschema.exceptions import ValidationError, best_match
from wrapt import synchronized from wrapt import synchronized
from freqtrade import __version__ from freqtrade import __version__

View File

@ -1,20 +1,19 @@
# pragma pylint: disable=missing-docstring,W0212 # pragma pylint: disable=missing-docstring,W0212
import logging import logging
from typing import Tuple, Dict from typing import Dict, Tuple
import arrow import arrow
from pandas import DataFrame, Series from pandas import DataFrame, Series
from tabulate import tabulate from tabulate import tabulate
import freqtrade.misc as misc
import freqtrade.optimize as optimize
from freqtrade import exchange from freqtrade import exchange
from freqtrade.analyze import populate_buy_trend, populate_sell_trend from freqtrade.analyze import populate_buy_trend, populate_sell_trend
from freqtrade.exchange import Bittrex from freqtrade.exchange import Bittrex
from freqtrade.main import min_roi_reached from freqtrade.main import min_roi_reached
import freqtrade.misc as misc
from freqtrade.optimize import preprocess from freqtrade.optimize import preprocess
import freqtrade.optimize as optimize
from freqtrade.persistence import Trade from freqtrade.persistence import Trade
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -11,10 +11,11 @@ from functools import reduce
from math import exp from math import exp
from operator import itemgetter from operator import itemgetter
from hyperopt import fmin, tpe, hp, Trials, STATUS_OK, STATUS_FAIL, space_eval from hyperopt import STATUS_FAIL, STATUS_OK, Trials, fmin, hp, space_eval, tpe
from hyperopt.mongoexp import MongoTrials from hyperopt.mongoexp import MongoTrials
from pandas import DataFrame from pandas import DataFrame
from freqtrade import main # noqa
from freqtrade import exchange, optimize from freqtrade import exchange, optimize
from freqtrade.exchange import Bittrex from freqtrade.exchange import Bittrex
from freqtrade.misc import load_config from freqtrade.misc import load_config

View File

@ -1,10 +1,11 @@
import logging import logging
from datetime import datetime from datetime import datetime
from decimal import Decimal, getcontext from decimal import Decimal, getcontext
from typing import Optional, Dict from typing import Dict, Optional
import arrow import arrow
from sqlalchemy import Boolean, Column, DateTime, Float, Integer, String, create_engine from sqlalchemy import (Boolean, Column, DateTime, Float, Integer, String,
create_engine)
from sqlalchemy.engine import Engine from sqlalchemy.engine import Engine
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.scoping import scoped_session from sqlalchemy.orm.scoping import scoped_session

View File

@ -1,21 +1,21 @@
import logging import logging
import re import re
from datetime import datetime, timedelta
from decimal import Decimal from decimal import Decimal
from datetime import timedelta, datetime from typing import Any, Callable
from typing import Callable, Any
import arrow import arrow
from pandas import DataFrame from pandas import DataFrame
from sqlalchemy import and_, func, text from sqlalchemy import and_, func, text
from tabulate import tabulate from tabulate import tabulate
from telegram import ParseMode, Bot, Update, ReplyKeyboardMarkup from telegram import Bot, ParseMode, ReplyKeyboardMarkup, Update
from telegram.error import NetworkError, TelegramError from telegram.error import NetworkError, TelegramError
from telegram.ext import CommandHandler, Updater from telegram.ext import CommandHandler, Updater
from freqtrade import exchange, __version__ from freqtrade import __version__, exchange
from freqtrade.misc import get_state, State, update_state
from freqtrade.persistence import Trade
from freqtrade.fiat_convert import CryptoToFiatConverter from freqtrade.fiat_convert import CryptoToFiatConverter
from freqtrade.misc import State, get_state, update_state
from freqtrade.persistence import Trade
# Remove noisy log messages # Remove noisy log messages
logging.getLogger('requests.packages.urllib3').setLevel(logging.INFO) logging.getLogger('requests.packages.urllib3').setLevel(logging.INFO)

View File

@ -2,10 +2,10 @@
from datetime import datetime from datetime import datetime
from unittest.mock import MagicMock from unittest.mock import MagicMock
import pytest
import arrow import arrow
import pytest
from jsonschema import validate from jsonschema import validate
from telegram import Message, Chat, Update from telegram import Chat, Message, Update
from freqtrade.misc import CONF_SCHEMA from freqtrade.misc import CONF_SCHEMA

View File

@ -6,8 +6,9 @@ import arrow
import pytest import pytest
from pandas import DataFrame from pandas import DataFrame
from freqtrade.analyze import parse_ticker_dataframe, populate_buy_trend, populate_indicators, \ from freqtrade.analyze import (SignalType, get_signal, parse_ticker_dataframe,
get_signal, SignalType, populate_sell_trend populate_buy_trend, populate_indicators,
populate_sell_trend)
@pytest.fixture @pytest.fixture

View File

@ -1,7 +1,7 @@
import pandas import pandas
from freqtrade import analyze
import freqtrade.optimize import freqtrade.optimize
from freqtrade import analyze
_pairs = ['BTC_ETH'] _pairs = ['BTC_ETH']

View File

@ -1,10 +1,11 @@
# pragma pylint: disable=missing-docstring, too-many-arguments, too-many-ancestors, C0103 # pragma pylint: disable=missing-docstring, too-many-arguments, too-many-ancestors, C0103
import time import time
import pytest
from unittest.mock import MagicMock from unittest.mock import MagicMock
from freqtrade.fiat_convert import CryptoToFiatConverter, CryptoFiat import pytest
from freqtrade.fiat_convert import CryptoFiat, CryptoToFiatConverter
def test_pair_convertion_object(): def test_pair_convertion_object():

View File

@ -1,22 +1,21 @@
# pragma pylint: disable=missing-docstring,C0103 # pragma pylint: disable=missing-docstring,C0103
import copy import copy
import logging
from unittest.mock import MagicMock from unittest.mock import MagicMock
import arrow
import pytest import pytest
import requests import requests
import logging
import arrow
from sqlalchemy import create_engine from sqlalchemy import create_engine
import freqtrade.main as main
from freqtrade import DependencyException, OperationalException from freqtrade import DependencyException, OperationalException
from freqtrade.analyze import SignalType from freqtrade.analyze import SignalType
from freqtrade.exchange import Exchanges from freqtrade.exchange import Exchanges
from freqtrade.main import create_trade, handle_trade, init, \ from freqtrade.main import (_process, check_handle_timedout, create_trade,
get_target_bid, _process, execute_sell, check_handle_timedout execute_sell, get_target_bid, handle_trade, init)
from freqtrade.misc import get_state, State from freqtrade.misc import State, get_state
from freqtrade.persistence import Trade from freqtrade.persistence import Trade
import freqtrade.main as main
# Test that main() can start backtesting or hyperopt. # Test that main() can start backtesting or hyperopt.
# and also ensure we can pass some specific arguments # and also ensure we can pass some specific arguments

View File

@ -1,14 +1,14 @@
# pragma pylint: disable=missing-docstring,C0103 # pragma pylint: disable=missing-docstring,C0103
import argparse
import json import json
import time import time
import argparse
from copy import deepcopy from copy import deepcopy
import pytest import pytest
from jsonschema import ValidationError from jsonschema import ValidationError
from freqtrade.misc import throttle, parse_args, load_config,\ from freqtrade.misc import (common_args_parser, load_config, parse_args,
common_args_parser throttle)
def test_throttle(): def test_throttle():