You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I can't reproduce this (but will add that mypy passes for an example project to our new CI stage).
Could you tell me the deepl and mypy versions please?
I tested the following:
mkdir python_test
cd python_test
python3 -m venv .venv
source .venv/bin/activate
pip install deepl mypy
pip freeze
certifi==2023.7.22
charset-normalizer==3.3.2
deepl==1.16.1
idna==3.4
mypy==1.6.1
mypy-extensions==1.0.0
requests==2.31.0
typing_extensions==4.8.0
urllib3==2.0.7
echo"import deepltranslator = deepl.Translator('abc')"> script.py
mypy script.py
Success: no issues found in 1 source file
If I use deepl.Translator(...) with the 3 dots, I get
script.py:4: error: Argument 1 to "Translator" has incompatible type "ellipsis"; expected "str" [arg-type]
Found 1 error in 1 file (checked 1 source file)
The code
Produces the following
mypy
error:error: Module "deepl" does not explicitly export attribute "Translator" [attr-defined]
The text was updated successfully, but these errors were encountered: