- Package Name: azure.core
- Package Version: 1.9.0
- Operating System: Arch Linux
- Python Version: 3.9.0
Describe the bug
Importing from azure.core.* will cause a hard-to-suppress mypy typechecking error about internal type annotations of azure core that have syntax errors.
I don't understand why it only happens on 3.9.0.
Note that mypy has a really hard time with syntax errors: python/mypy#6897 which makes it hard for the end user to ignore them.
To Reproduce
- Clone https://github.com/EncircleInc/azure-core-mypy-error
pip install -r requirements.lock.txt file.
mypy -p test. You'll get something like .../python3.9/site-packages/azure/core/pipeline/policies/_authentication.py:33: error: syntax error in type comment '(TokenCredential, *str, Mapping[str, Any]) -> None
- Try to suppress the error by adding
ignore_errors = True in the mypy.ini file.
mypy -p test still errors out.
Expected behavior
No type errors when using default mypy settings, or an error saying there aren't any types available.
Describe the bug
Importing from
azure.core.*will cause a hard-to-suppress mypy typechecking error about internal type annotations of azure core that have syntax errors.I don't understand why it only happens on 3.9.0.
Note that mypy has a really hard time with syntax errors: python/mypy#6897 which makes it hard for the end user to ignore them.
To Reproduce
pip install -r requirements.lock.txtfile.mypy -p test. You'll get something like.../python3.9/site-packages/azure/core/pipeline/policies/_authentication.py:33: error: syntax error in type comment '(TokenCredential, *str, Mapping[str, Any]) -> Noneignore_errors = Truein themypy.inifile.mypy -p teststill errors out.Expected behavior
No type errors when using default mypy settings, or an error saying there aren't any types available.