Skip to content

Commit 383d31f

Browse files
author
Niels Ekkelenkamp
committed
other linter stuff
1 parent 75ebb79 commit 383d31f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

python_gpt_po/services/translation_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,19 +342,19 @@ def scan_and_process_po_files(
342342
continue
343343

344344
# Process the file, passing the prepared po_file and file_lang
345-
po_file, file_lang = po_file_result
346-
self.process_po_file(po_file_path, languages, detail_languages, po_file=po_file, file_lang=file_lang)
345+
self.process_po_file(po_file_path, languages, detail_languages, po_file_result)
347346

348347
def process_po_file(
349348
self,
350349
po_file_path: str,
351350
languages: List[str],
352351
detail_languages: Optional[Dict[str, str]] = None,
353-
po_file=None,
354-
file_lang=None
352+
po_file_result=None,
355353
):
356354
"""Processes a single .po file with translations."""
357355
try:
356+
po_file, file_lang = po_file_result
357+
358358
# Only prepare the po_file if not provided (for backward compatibility)
359359
if po_file is None or file_lang is None:
360360
po_file_result = self._prepare_po_file(po_file_path, languages)

python_gpt_po/tests/unit/test_translation_service_fuzzy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import polib
21
from unittest.mock import MagicMock, patch
2+
3+
import polib
4+
35
from python_gpt_po.models.config import TranslationConfig
46
from python_gpt_po.models.enums import ModelProvider
57
from python_gpt_po.models.provider_clients import ProviderClients

0 commit comments

Comments
 (0)