fix: replace str | None with Optional[str] for Python 3.9 compat
All checks were successful
Deploy Bot on NAS / deploy (push) Successful in 16s
All checks were successful
Deploy Bot on NAS / deploy (push) Successful in 16s
str | None union syntax requires Python 3.10+, bot runs on 3.9-slim. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
acabc7d409
commit
cebd1f2e0a
1 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue