Skip to content

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

Closed

Description

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions