Skip to content

Can't use mypy because of missing py.typed file in the distribution #2985

Closed
@ycrouin

Description

@ycrouin

Describe the bug
This SageMaker sdk package doesn't ship with a py.typed file in the distribution.
Because of this, when we install this package, mypy can't use the existing type annotations.
It is quite straightforward to make a package PEP-561 compatible. Mypy documents it here: https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages

To reproduce

pip install sagemaker
touch sad_mypy.py
pip install mypy
mypy sad_mypy.py

Expected behavior
Mypy should be able to use the type annotations from the package.

Screenshots or logs
Screenshot from 2022-03-10 18-23-34

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions