tessl install tessl/pypi-googletrans@4.0.0An unofficial Google Translate API for Python providing free text translation and language detection capabilities
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.01x
Baseline
Agent success rate without this tile
99%
{
"context": "This criteria evaluates how well the engineer utilizes googletrans's advanced type system, including proper type annotations, correct usage of Union types, and understanding of the package's method overloading that returns different types based on input types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Translator import",
"description": "Correctly imports the Translator class from googletrans package",
"max_score": 5
},
{
"name": "Type imports",
"description": "Imports Translated and Detected types from googletrans for proper type annotations",
"max_score": 10
},
{
"name": "Async translate usage",
"description": "Uses await translator.translate() for translating text, properly handling the async nature of the API",
"max_score": 15
},
{
"name": "Async detect usage",
"description": "Uses await translator.detect() for language detection, properly handling the async nature of the API",
"max_score": 15
},
{
"name": "Union type annotations",
"description": "Uses typing.Union[str, typing.List[str]] type annotations for method parameters that accept both single strings and lists",
"max_score": 15
},
{
"name": "Return type annotations",
"description": "Uses typing.Union[Translated, typing.List[Translated]] and typing.Union[Detected, typing.List[Detected]] for return type annotations to reflect different return types based on input",
"max_score": 15
},
{
"name": "Batch translation",
"description": "Correctly passes lists of strings to translator.translate() for batch processing, taking advantage of the package's overloaded method signature",
"max_score": 10
},
{
"name": "Batch detection",
"description": "Correctly passes lists of strings to translator.detect() for batch language detection, taking advantage of the package's overloaded method signature",
"max_score": 10
},
{
"name": "Resource management",
"description": "Properly manages Translator lifecycle by storing an instance and calling appropriate cleanup, or using async context manager pattern with 'async with Translator()'",
"max_score": 5
}
]
}