diff --git a/bot.py b/bot.py index 1d8d155..2b654f9 100644 --- a/bot.py +++ b/bot.py @@ -262,8 +262,8 @@ def intra(update: Update, context: CallbackContext): update.message.reply_photo( photo=buf, caption=f"\nIntraday chart for ${symbol.upper()} from {df.first_valid_index().strftime('%I:%M')} to" - + " {df.last_valid_index().strftime('%I:%M')} ET on" - + " {datetime.date.today().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}", + + f" {df.last_valid_index().strftime('%I:%M')} ET on" + + f" {datetime.date.today().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}", parse_mode=telegram.ParseMode.MARKDOWN, ) @@ -301,7 +301,7 @@ def chart(update: Update, context: CallbackContext): update.message.reply_photo( photo=buf, caption=f"\n1 Month chart for ${symbol.upper()} from {df.first_valid_index().strftime('%d, %b %Y')}" - + " to {df.last_valid_index().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}", + + f" to {df.last_valid_index().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}", parse_mode=telegram.ParseMode.MARKDOWN, ) diff --git a/functions.py b/functions.py index 48d8f7a..6b73bb5 100644 --- a/functions.py +++ b/functions.py @@ -106,7 +106,7 @@ _Donations can only be made in a chat directly with @simplestockbot_ else: return ( f"{['status']['indicator']}: {['status']['description']}." - + " Please check the status page for more information. https://status.iexapis.com" + + f" Please check the status page for more information. https://status.iexapis.com" ) def message_status(self): @@ -210,7 +210,7 @@ _Donations can only be made in a chat directly with @simplestockbot_ else: message = ( f"{IEXData['companyName']} closed at $**{IEXData['latestPrice']}**," - + " after hours _(15 minutes delayed)_ stock price is $**{IEXData['extendedPrice']}**" + + f" after hours _(15 minutes delayed)_ stock price is $**{IEXData['extendedPrice']}**" ) change = round(IEXData["extendedChangePercent"] * 100, 2) @@ -299,7 +299,7 @@ _Donations can only be made in a chat directly with @simplestockbot_ data = response.json() infoMessages[symbol] = ( f"Company Name: [{data['companyName']}]({data['website']})\nIndustry:" - + " {data['industry']}\nSector: {data['sector']}\nCEO: {data['CEO']}\nDescription: {data['description']}\n" + + f" {data['industry']}\nSector: {data['sector']}\nCEO: {data['CEO']}\nDescription: {data['description']}\n" ) else: