pylama code style fixes.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Alexey Skobkin 2022-07-10 03:24:15 +03:00
parent bb72ed3ae2
commit eae24b10db
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
2 changed files with 11 additions and 3 deletions

6
bot.py
View File

@ -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'))

View File

@ -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'))