fix pylint warnings in __init__ files

This commit is contained in:
Janne Sinivirta 2017-11-18 09:52:28 +02:00
parent 187fea0c28
commit 4b08e3d571
3 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,4 @@
""" FreqTrade bot """
__version__ = '0.14.2' __version__ = '0.14.2'
from . import main from . import main

View File

@ -1,3 +1,5 @@
# pragma pylint: disable=W0603
""" Cryptocurrency Exchanges support """
import enum import enum
import logging import logging
from random import randint from random import randint
@ -77,7 +79,7 @@ def validate_pairs(pairs: List[str]) -> None:
def buy(pair: str, rate: float, amount: float) -> str: def buy(pair: str, rate: float, amount: float) -> str:
if _CONF['dry_run']: if _CONF['dry_run']:
global _DRY_RUN_OPEN_ORDERS global _DRY_RUN_OPEN_ORDERS
order_id = 'dry_run_buy_{}'.format(randint(0, 1e6)) order_id = 'dry_run_buy_{}'.format(randint(0, 10**6))
_DRY_RUN_OPEN_ORDERS[order_id] = { _DRY_RUN_OPEN_ORDERS[order_id] = {
'pair': pair, 'pair': pair,
'rate': rate, 'rate': rate,
@ -95,7 +97,7 @@ def buy(pair: str, rate: float, amount: float) -> str:
def sell(pair: str, rate: float, amount: float) -> str: def sell(pair: str, rate: float, amount: float) -> str:
if _CONF['dry_run']: if _CONF['dry_run']:
global _DRY_RUN_OPEN_ORDERS global _DRY_RUN_OPEN_ORDERS
order_id = 'dry_run_sell_{}'.format(randint(0, 1e6)) order_id = 'dry_run_sell_{}'.format(randint(0, 10**6))
_DRY_RUN_OPEN_ORDERS[order_id] = { _DRY_RUN_OPEN_ORDERS[order_id] = {
'pair': pair, 'pair': pair,
'rate': rate, 'rate': rate,

View File

@ -1,3 +1,4 @@
# pragma pylint: disable=missing-docstring
import json import json
import os import os
@ -14,6 +15,6 @@ def load_backtesting_data(ticker_interval: int = 5):
abspath=path, abspath=path,
pair=pair, pair=pair,
ticker_interval=ticker_interval, ticker_interval=ticker_interval,
)) as fp: )) as tickerdata:
result[pair] = json.load(fp) result[pair] = json.load(tickerdata)
return result return result