From 4b08e3d5712365646bcb3e00e6c1b812adf4331b Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sat, 18 Nov 2017 09:52:28 +0200 Subject: [PATCH] fix pylint warnings in __init__ files --- freqtrade/__init__.py | 1 + freqtrade/exchange/__init__.py | 6 ++++-- freqtrade/tests/__init__.py | 11 ++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 75254ebcc..522ceeeb0 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,3 +1,4 @@ +""" FreqTrade bot """ __version__ = '0.14.2' from . import main diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index a6e986f7b..4eed0a61d 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -1,3 +1,5 @@ +# pragma pylint: disable=W0603 +""" Cryptocurrency Exchanges support """ import enum import logging from random import randint @@ -77,7 +79,7 @@ def validate_pairs(pairs: List[str]) -> None: def buy(pair: str, rate: float, amount: float) -> str: if _CONF['dry_run']: 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] = { 'pair': pair, 'rate': rate, @@ -95,7 +97,7 @@ def buy(pair: str, rate: float, amount: float) -> str: def sell(pair: str, rate: float, amount: float) -> str: if _CONF['dry_run']: 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] = { 'pair': pair, 'rate': rate, diff --git a/freqtrade/tests/__init__.py b/freqtrade/tests/__init__.py index c6ac0797c..c5cc708c9 100644 --- a/freqtrade/tests/__init__.py +++ b/freqtrade/tests/__init__.py @@ -1,3 +1,4 @@ +# pragma pylint: disable=missing-docstring import json import os @@ -11,9 +12,9 @@ def load_backtesting_data(ticker_interval: int = 5): ] for pair in pairs: with open('{abspath}/testdata/{pair}-{ticker_interval}.json'.format( - abspath=path, - pair=pair, - ticker_interval=ticker_interval, - )) as fp: - result[pair] = json.load(fp) + abspath=path, + pair=pair, + ticker_interval=ticker_interval, + )) as tickerdata: + result[pair] = json.load(tickerdata) return result