Skip to content

Commit

Permalink
chore: solve pylint warnings (UNICT-DMI#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
scraccio authored Mar 14, 2023
1 parent c631367 commit 6767079
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ min-public-methods=2
[EXCEPTIONS]

# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception


[FORMAT]
Expand Down
4 changes: 2 additions & 2 deletions module/callback_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def md_handler(update: Update, context: CallbackContext) -> None:
message_text = read_md(data)

check_log(update, data, is_query=True)
if_disable_preview = (data == "faq")
if_disable_preview = data == "faq"
context.bot.editMessageText(text=message_text, chat_id=query.message.chat_id, message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=if_disable_preview)


Expand All @@ -87,7 +87,7 @@ def informative_callback(update: Update, context: CallbackContext) -> None:
cmd = "segnalazione"
message_text = read_md(cmd)
check_log(update, cmd)
if_disable_preview = (cmd == 'cloud' or cmd == 'faq')
if_disable_preview = cmd in ('cloud', 'faq')
context.bot.sendMessage(chat_id=update.message.chat_id, text=message_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=if_disable_preview)


Expand Down
2 changes: 1 addition & 1 deletion module/debug/log_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def notify_error_admin(context: CallbackContext, traceback_str: str):
Args:
context: context passed by the handler
"""
text = (f'An exception was raised:\n' f'<pre>{html.escape(traceback_str)}</pre>')
text = f'An exception was raised:\n' f'<pre>{html.escape(traceback_str)}</pre>'
context.bot.send_message(chat_id=config_map['dev_group_chatid_logs'], text=text, parse_mode=ParseMode.HTML)


Expand Down

0 comments on commit 6767079

Please sign in to comment.