Skip to content

Commit b6a0993

Browse files
committed
ruff fix
1 parent 5ce31f7 commit b6a0993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/translations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ def translate_with_azure(text, from_lang, to_lang):
2020

2121
request = requests.post(url, params=params, headers=headers, json=body)
2222
response = request.json()
23-
if (type(response) is dict) and (err := response.get("error", None)):
23+
if isinstance(response, dict) and (err := response.get("error", None)):
2424
return None, err["message"], "AZURE"
2525
return response[0]["translations"][0]["text"], None, "AZURE"

0 commit comments

Comments
 (0)