docstrings improved

This commit is contained in:
hroff-1902 2019-04-07 00:22:02 +03:00
parent dc1968b968
commit d6d16b4696
1 changed files with 4 additions and 8 deletions

View File

@ -136,8 +136,8 @@ def deep_merge_dicts(source, destination):
def timeframe_to_seconds(ticker_interval: str) -> int: def timeframe_to_seconds(ticker_interval: str) -> int:
""" """
This function uses ccxt to parse the timeframe interval value written in the human readable Translates the timeframe interval value written in the human readable
form ('1m', '5m', '1h', '1d', '1w', etc.) and returns the number form ('1m', '5m', '1h', '1d', '1w', etc.) to the number
of seconds for one timeframe interval. of seconds for one timeframe interval.
""" """
return Exchange.parse_timeframe(ticker_interval) return Exchange.parse_timeframe(ticker_interval)
@ -145,17 +145,13 @@ def timeframe_to_seconds(ticker_interval: str) -> int:
def timeframe_to_minutes(ticker_interval: str) -> int: def timeframe_to_minutes(ticker_interval: str) -> int:
""" """
This function uses ccxt to parse the timeframe interval value written in the human readable Same as above, but returns minutes.
form ('1m', '5m', '1h', '1d', '1w', etc.) and returns the number
of minutes for one timeframe interval.
""" """
return Exchange.parse_timeframe(ticker_interval) // 60 return Exchange.parse_timeframe(ticker_interval) // 60
def timeframe_to_msecs(ticker_interval: str) -> int: def timeframe_to_msecs(ticker_interval: str) -> int:
""" """
This function uses ccxt to parse the timeframe interval value written in the human readable Same as above, but returns milliseconds.
form ('1m', '5m', '1h', '1d', '1w', etc.) and returns the number
of milliseconds for one timeframe interval.
""" """
return Exchange.parse_timeframe(ticker_interval) * 1000 return Exchange.parse_timeframe(ticker_interval) * 1000