Skip to content

Commit

Permalink
almost finish fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Perceval ARENOU committed Nov 9, 2023
1 parent fc608e3 commit b0d35ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ warn_unused_ignores = false
[tool.pylint.'MESSAGES CONTROL']
max-line-length = 90
disable = """
fixme,
import-error,
not-callable,
undefined-variable
"""
4 changes: 4 additions & 0 deletions src/flantier/christmas_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,14 @@ def update_wishes_list(update: Update, context: CallbackContext):


def init_christmas():
"""Start Christmas: load users and close registrations."""
roulette = Roulette()
roulette.inscriptions_open = False
roulette.load_users()


def start(update: Update, context: CallbackContext):
"""Start the interaction with the bot. Enable the bot to talk to user."""
context.bot.send_message(
chat_id=update.effective_chat.id,
text=(
Expand All @@ -461,6 +463,7 @@ def start(update: Update, context: CallbackContext):


def help_message(update: Update, context: CallbackContext):
"""Send the help message with all available commands"""
simple_help = """Voici les commandes disponibles:
/aide - affiche cette aide
/participer - s'inscrire pour le secret santa
Expand Down Expand Up @@ -516,6 +519,7 @@ def send_audio_quote(chat_id: int, context: CallbackContext, folder: Path):
audio = folder / Path(choice(audio_files))

context.bot.send_chat_action(chat_id=chat_id, action=ChatAction.RECORD_AUDIO)
# pylint: disable=R1732
context.bot.send_audio(
chat_id=chat_id, audio=open(audio, "rb"), disable_notification=True
)
Expand Down
2 changes: 1 addition & 1 deletion src/flantier/santa.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def load_cadeaux():

def find_wishes(tg_id, name, with_comments=False, table=False):
"""Trouve et retourne la liste de souhaits avec le nom de la personne."""
matches = [qqun for qqun in participants if (qqun.name == name)]
matches = [qqun for qqun in participants if qqun.name == name]

if len(matches) == 0:
if table:
Expand Down

0 comments on commit b0d35ec

Please sign in to comment.