gitignore: exclude Python bytecode cache

This commit is contained in:
2026-09-05 00:35:47 +02:00
rodzic 260ec51442
commit 863df5e17b
3 zmienionych plików z 26 dodań i 0 usunięć
+4
Wyświetl plik
@@ -4,6 +4,10 @@
*.swp
.DS_Store
# Ignora file compilati Python
__pycache__/
*.pyc
# Ignora file di build o output comuni
build/
dist/
Plik binarny nie jest wyświetlany.
+22
Wyświetl plik
@@ -1155,6 +1155,8 @@ def process_event(job: dict) -> None:
sender_user_id,
)
translations = []
for recipient in recipients:
target_language = normalize_language_code(
get_user_language(recipient),
@@ -1169,6 +1171,26 @@ def process_event(job: dict) -> None:
if translated.strip().lower() == message_text.lower():
continue
translations.append((recipient, target_language, translated))
if not translations:
return
deleted = delete_message(
token,
message_id,
)
if not deleted:
log.warning(
"Original message %s was not deleted. "
"Generated translations will not be posted "
"to avoid confusing duplicates.",
message_id,
)
return
for recipient, target_language, translated in translations:
post_manager_message(
token,
f"@{sender_display_name}: {translated}",