From eae24b10db22897dc802fb844d975467b8183350 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 10 Jul 2022 03:24:15 +0300 Subject: [PATCH] pylama code style fixes. --- bot.py | 6 +++++- update.py | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 6e35c38..f215ab1 100644 --- a/bot.py +++ b/bot.py @@ -13,7 +13,11 @@ db_path = os.getenv('DATABASE_PATH', './bot.db') log_level = os.getenv('LOG_LEVEL', 'INFO') print('Starting the bot with logging level', log_level.upper()) -logging.basicConfig(level=log_level.upper(), format='%(asctime)s: <%(name)s> [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S') +logging.basicConfig( + level=log_level.upper(), + format='%(asctime)s: <%(name)s> [%(levelname)s] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', +) db = Database(db_path, logging.getLogger('Database')) bot = CommandProcessor(token, db, logging.getLogger('CommandProcessor')) diff --git a/update.py b/update.py index 757abc7..05cb5c8 100644 --- a/update.py +++ b/update.py @@ -1,6 +1,6 @@ import logging -from dotenv import load_dotenv import os +from dotenv import load_dotenv from rss import RssReader from update_manager import UpdateManager @@ -14,7 +14,11 @@ db_path = os.getenv('DATABASE_PATH', './bot.db') log_level = os.getenv('LOG_LEVEL', 'INFO') print('Starting the updater with logging level', log_level.upper()) -logging.basicConfig(level=log_level.upper(), format='%(asctime)s: <%(name)s> [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S') +logging.basicConfig( + level=log_level.upper(), + format='%(asctime)s: <%(name)s> [%(levelname)s] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S' +) db = Database(db_path, logging.getLogger('Database')) notifier = Notifier(token, logging.getLogger('Notifier'))