cognee/cognee/tasks/translation/providers
andikarachman 69c25b43d7 refactor: address code review feedback
- Made is_available() abstract in base.py with proper implementation in providers
- Added original_error parameter to UnsupportedLanguageError and TranslationConfigError
- Added Field validation for confidence_threshold bounds (0.0-1.0)
- Changed @lru_cache to @lru_cache() for explicit style
- Added get_translation_provider to __all__ in providers/__init__.py
- Replaced deprecated asyncio.get_event_loop() with get_running_loop()
- Added debug logging to is_available() in GoogleTranslationProvider
- Added TODO comment for confidence score improvement in OpenAIProvider
- Added None check for read_query_prompt() with fallback default prompt
- Moved ClientSession outside batch loop in AzureTranslationProvider
- Fixed Optional[float] type annotation in detect_language()
- Added Note section documenting in-place mutation in translate_content()
- Added test_confidence_threshold_validation() for bounds testing
- Added descriptive assertion messages to config tests
- Converted all async tests to use @pytest.mark.asyncio decorators
- Replaced manual skip checks with @pytest.mark.skipif
- Removed manual main() blocks, tests now pytest-only
- Changed Chinese language assertion to use startswith('zh') for flexibility
2026-01-04 12:06:50 +07:00
..
__init__.py refactor: address code review feedback 2026-01-04 12:06:50 +07:00
azure_provider.py refactor: address code review feedback 2026-01-04 12:06:50 +07:00
base.py refactor: address code review feedback 2026-01-04 12:06:50 +07:00
google_provider.py refactor: address code review feedback 2026-01-04 12:06:50 +07:00
openai_provider.py refactor: address code review feedback 2026-01-04 12:06:50 +07:00