Skip to content

Commit

Permalink
fixed minor formatting and linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Leky1738 committed Oct 10, 2024
1 parent cbf782c commit dea4c62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def validate_environment(cls, values: Dict) -> Any:

return values

def _translate_text(self, text: str, to_language: str = 'en') -> str:
def _translate_text(self, text: str, to_language: str = "en") -> str:
"""
Perform text translation using the Azure Translator API.
Expand All @@ -81,7 +81,6 @@ def _translate_text(self, text: str, to_language: str = 'en') -> str:

# Ensure that the translation client is initialized
# by validating the environment

if not self.translate_client:
values = self.validate_environment({})
self.translate_client = values["translate_client"]
Expand Down
20 changes: 4 additions & 16 deletions translate_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"id": "initial_id",
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2024-10-10T02:47:56.321997Z",
"start_time": "2024-10-10T02:47:56.307997Z"
"jupyter": {
"is_executing": true
}
},
"source": [
Expand All @@ -19,19 +18,8 @@
"\n",
"load_dotenv()"
],
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 8
"outputs": [],
"execution_count": null
},
{
"metadata": {
Expand Down

0 comments on commit dea4c62

Please sign in to comment.