gitignore: exclude Python bytecode cache

Этот коммит содержится в:
2026-09-05 00:35:47 +02:00
родитель 260ec51442
Коммит 863df5e17b
3 изменённых файлов: 26 добавлений и 0 удалений
+4
Просмотреть файл
@@ -4,6 +4,10 @@
*.swp
.DS_Store
# Ignora file compilati Python
__pycache__/
*.pyc
# Ignora file di build o output comuni
build/
dist/
Двоичный файл не отображается.
+22
Просмотреть файл
@@ -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}",