-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
Azure.CoreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
- 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.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]) -> None- Try to suppress the error by adding
ignore_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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Azure.CoreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that