Skip to content

Commit

Permalink
fix: solve pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
salvo-polizzi committed Mar 17, 2023
1 parent d6c6d5e commit beba8c4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,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
2 changes: 1 addition & 1 deletion module/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
from .ufficio_ersu import ufficio_ersu
from .menu import menu
from .menu_settings import menu_settings
from .faq import faq_cmd
from .faq import faq_cmd
9 changes: 7 additions & 2 deletions module/commands/faq.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""/faq command"""
from telegram import Update, ParseMode
from telegram.ext import CallbackContext
from module.shared import read_md

"""/faq command"""

def faq_cmd(update: Update, context: CallbackContext) -> None:
"""Called by /faq command.
List all the faq about ersu fellowship
Expand All @@ -12,4 +13,8 @@ def faq_cmd(update: Update, context: CallbackContext) -> None:
context: context passed by the handler
"""
message_text = read_md("faq")
context.bot.send_message(chat_id=update.message.chat_id, text=message_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
context.bot.send_message(
chat_id=update.message.chat_id,
text=message_text,
parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True
)
1 change: 0 additions & 1 deletion module/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ class Config(TypedDict):
# config
with open('config/settings.yaml', 'r', encoding='utf-8') as yaml_config:
config_map: Config = yaml.load(yaml_config, Loader=yaml.SafeLoader) # type: ignore

0 comments on commit beba8c4

Please sign in to comment.