From 5a163a65a8b46b4ead4c25d0dbd9b658e8b5b692 Mon Sep 17 00:00:00 2001 From: wface Date: Sun, 11 Jul 2021 11:26:05 +0200 Subject: [PATCH] changed yfinance requirement to 0.1.62 --- inkycal/modules/inkycal_stocks.py | 6 +++--- requirements.txt | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inkycal/modules/inkycal_stocks.py b/inkycal/modules/inkycal_stocks.py index 402aedb..2d623e9 100644 --- a/inkycal/modules/inkycal_stocks.py +++ b/inkycal/modules/inkycal_stocks.py @@ -173,12 +173,12 @@ class Stocks(inkycal_module): def percentageStr(number): return '({:+.2f}%)'.format(number) - def gainStr(number): - return '{:+.3f}'.format(number) + def gainStr(precision, number): + return "%+.*f" % (precision, number) stockNameLine = '{} ({})'.format(stockName, stockCurrency) stockCurrentValueLine = '{} {} {}'.format( - floatStr(precision, currentQuote), gainStr(currentGain), percentageStr(currentGainPercentage)) + floatStr(precision, currentQuote), gainStr(precision, currentGain), percentageStr(currentGainPercentage)) stockDayValueLine = '1d OHL: {}/{}/{}'.format( floatStr(precision, currentOpen), floatStr(precision, currentHigh), floatStr(precision, currentLow)) maxQuote = max(stockHistory.High) diff --git a/requirements.txt b/requirements.txt index 895db0c..17db6a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ arrow==0.17.0 # time operations Flask==1.1.2 # webserver Flask-WTF==0.14.3 # webforms todoist-python==8.1.2 # todoist api -yfinance>=0.1.60 # yahoo stocks +yfinance>=0.1.62 # yahoo stocks diff --git a/setup.py b/setup.py index 9e3a5f3..481e8f7 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ __install_requires__ = ['pyowm==3.1.1', # weather 'Flask==1.1.2', # webserver 'Flask-WTF==0.14.3', # webforms 'todoist-python==8.1.2', # todoist api - 'yfinance>=0.1.60', # yahoo stocks + 'yfinance>=0.1.62', # yahoo stocks ] __classifiers__ = [