pylama code style fixes.

This commit is contained in:
Alexey Skobkin 2022-07-10 03:24:15 +03:00
parent 099c9f77a3
commit 01ab35210f
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') log_level = os.getenv('LOG_LEVEL', 'INFO')
print('Starting the bot with logging level', log_level.upper()) 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')) db = Database(db_path, logging.getLogger('Database'))
bot = CommandProcessor(token, db, logging.getLogger('CommandProcessor')) bot = CommandProcessor(token, db, logging.getLogger('CommandProcessor'))

View file

@ -1,6 +1,6 @@
import logging import logging
from dotenv import load_dotenv
import os import os
from dotenv import load_dotenv
from rss import RssReader from rss import RssReader
from update_manager import UpdateManager from update_manager import UpdateManager
@ -14,7 +14,11 @@ db_path = os.getenv('DATABASE_PATH', './bot.db')
log_level = os.getenv('LOG_LEVEL', 'INFO') log_level = os.getenv('LOG_LEVEL', 'INFO')
print('Starting the updater with logging level', log_level.upper()) 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')) db = Database(db_path, logging.getLogger('Database'))
notifier = Notifier(token, logging.getLogger('Notifier')) notifier = Notifier(token, logging.getLogger('Notifier'))