Skip to content

Commit

Permalink
Fix: f-string is missing placeholders (F541)
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Jul 18, 2024
1 parent 842be0e commit 6c88bac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion terrariumEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(self, version):
# Caching total power and water usage
start = time.time()
self.relays = {}
logger.info(f"Start loading total power and water usage")
logger.info("Start loading total power and water usage")
self.get_power_usage_water_flow(True)
logger.info(f"Loaded total power and water usage in {time.time()-start:.2f} seconds.")

Expand Down
8 changes: 4 additions & 4 deletions terrariumNotification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2654,7 +2654,7 @@ async def area(self, update, context, enclosure_id=None):
async def help(self, update, context):
if await self._authenticate(update.message):
await update.message.reply_text(
f"""The following commands are supported:
"""The following commands are supported:
/start : This will start listening for notifications.
/webcam [webcam_id] : will show the latest image of the webcam ID.
Expand All @@ -2668,7 +2668,7 @@ async def help(self, update, context):
# function to handle normal text
async def text(self, update, context):
if await self._authenticate(update.message):
await update.message.reply_text(f"Sorry, no conversations...")
await update.message.reply_text("Sorry, no conversations...")

# function to handle errors ocurred in the dispatcher
async def error(self, update, context):
Expand All @@ -2688,7 +2688,7 @@ async def _connect(self):
try:
await self.telegram_bot.initialize()
await self.telegram_bot.start()
logger.info(f"Connected to Telegram")
logger.info("Connected to Telegram")
await self.telegram_bot.updater.start_polling()
except InvalidToken as ex:
logger.error(f"Error starting Telegram bot: {ex}")
Expand Down Expand Up @@ -2786,7 +2786,7 @@ async def _stop():
if self.__thread is not None:
self.__thread.join()

logger.info(f"Disconnected from Telegram")
logger.info("Disconnected from Telegram")

def send_message(self, _, subject, message, data=None, attachments=[]):
async def _send_message(subject, message, data=None, attachments=[]):
Expand Down
2 changes: 1 addition & 1 deletion terrariumWebserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def unsplash_background(self):
headers = {"Authorization": f"Client-ID {access_key}"}
query_params = {"query": query_string, "orientation": "landscape"}
background_image = requests.get(
f"https://api.unsplash.com/photos/random/", params=query_params, headers=headers
"https://api.unsplash.com/photos/random/", params=query_params, headers=headers
)

if background_image.ok:
Expand Down

0 comments on commit 6c88bac

Please sign in to comment.