Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track 2 SDKs should support PEP561 to enable mypy for customers #9572

Closed
lmazuel opened this issue Jan 23, 2020 · 6 comments
Closed

Track 2 SDKs should support PEP561 to enable mypy for customers #9572

lmazuel opened this issue Jan 23, 2020 · 6 comments
Labels
Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@lmazuel
Copy link
Member

lmazuel commented Jan 23, 2020

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:

@lmazuel lmazuel added the Client This issue points to a problem in the data-plane of the library. label Jan 23, 2020
@xiangyan99
Copy link
Member

Fixed azure.core in #9577

@kristapratico
Copy link
Member

Just checked - text analytics, form recognizer, metrics advisor, and document translation have py.typed files

@seankane-msft
Copy link
Member

Tables has a py.typed. Container Registry and AppConfiguration do not.

@rakshith91
Copy link
Contributor

Eventgrid and monitor don't have a py.typed
#18324
#18323

@chlowell
Copy link
Member

Identity doesn't have one: #18325

@yunhaoling
Copy link
Contributor

yunhaoling commented Apr 27, 2021

EventHubs, ServiceBus, SchemaRegistry don't have a py.typed

#18344
#18345
#18346

@lmazuel lmazuel modified the milestones: [2021] May, [2021] June May 24, 2021
@lmazuel lmazuel modified the milestones: [2021] June, [2021] August Jun 18, 2021
@lmazuel lmazuel closed this as completed Jul 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

7 participants