From cebd1f2e0a6dd13c3691253846c6e6a26687664d Mon Sep 17 00:00:00 2001 From: LE BERRE Mickael Date: Mon, 18 May 2026 10:47:20 +0200 Subject: [PATCH] fix: replace str | None with Optional[str] for Python 3.9 compat str | None union syntax requires Python 3.10+, bot runs on 3.9-slim. Co-Authored-By: Claude Sonnet 4.6 --- utils/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/helpers.py b/utils/helpers.py index e38489d..cbf4cf6 100644 --- a/utils/helpers.py +++ b/utils/helpers.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re from datetime import datetime +from typing import Optional from config import AUTHORIZED_CHANNEL_ID, DIFFICULTY_SHORTCUTS, CLAN_ROLE_IDS def parse_damage_amount(damage_str): @@ -43,7 +44,7 @@ def normalize_difficulty(difficulty): return DIFFICULTY_SHORTCUTS[difficulty_lower] return difficulty_lower -def get_clan_from_member(member) -> str | None: +def get_clan_from_member(member) -> Optional[str]: """Détecte le clan d'un membre via ses rôles Discord""" for role in member.roles: if role.id in CLAN_ROLE_IDS: