Track 2 SDKs should support PEP561 to enable mypy for customers
I just discovered that if a package is shipped using typing in comments annotation, it's actually ignored by mypy when used on a client code:
> mypy .\code.py
code.py:1: error: No library stub file for module 'azure.core'
code.py:1: note: (Stub files are from https://github.com/python/typeshed)
Found 1 error in 1 file (checked 1 source file)
To enable that scenario, we need to put a "py.typed" empty file at the root of the namespace, and mypy will then scan for comments annotations. The previous run now becomes:
> mypy .\code.py
Success: no issues found in 1 source file
Reference:
Fixed azure.core in #9577
Just checked - text analytics, form recognizer, metrics advisor, and document translation have py.typed files
Tables has a py.typed. Container Registry and AppConfiguration do not.
Eventgrid and monitor don't have a py.typed https://github.com/Azure/azure-sdk-for-python/issues/18324 https://github.com/Azure/azure-sdk-for-python/issues/18323
Identity doesn't have one: #18325
EventHubs, ServiceBus, SchemaRegistry don't have a py.typed
https://github.com/Azure/azure-sdk-for-python/issues/18344 https://github.com/Azure/azure-sdk-for-python/issues/18345 https://github.com/Azure/azure-sdk-for-python/issues/18346