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

[feature request] Missing py.typed marker file to support type checking in compliance with PEP 561 #1159

Closed
fdelu opened this issue Nov 21, 2023 · 4 comments
Assignees

Comments

@fdelu
Copy link

fdelu commented Nov 21, 2023

Is your feature request related to a problem? Please describe.
Yes. Mypy (type checking tool) prints the following error when importing azure.iot.device: Skipping analyzing "azure.iot.device": module is installed, but missing library stubs or py.typed marker.

Describe the solution you'd like
Adding the required py.typed empty marker files. See PEP 561.

Describe alternatives you've considered
Ignoring the error and stop type checking the library, although it's not ideal with such a simple fix.

Additional context
This was already fixed on the main SDK repo three years ago. See Issue #9572. There are several pull requests listed in that issue that added these marker files. I can try to create one for this repo if needed.

@fdelu fdelu changed the title [feature request] Missing py.typed marker file to support type checking in compliance to PEP 561 [feature request] Missing py.typed marker file to support type checking in compliance with PEP 561 Nov 21, 2023
@cartertinney
Copy link
Member

We will be looking at adding support for this in the next few months

@cartertinney cartertinney self-assigned this Dec 14, 2023
@fdelu
Copy link
Author

fdelu commented Dec 14, 2023

We will be looking at adding support for this in the next few months

Thanks! At first I thought the SDK just needed the marker files, but I later noticed that the actual type hints are needed, so I understand it's a bigger task than what I initially thought.

Do let me know if there's anything I can collaborate with. I'm not sure what's the best approach to do this knowing that this information is already present in the docstrings.

@cartertinney
Copy link
Member

Merged to main in #1163

Will be included in the next release.

@cartertinney
Copy link
Member

azure-iot-device version 2.13.0 is available now. Will close this issue - if anything is not working as expected, please open a new issue.

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

No branches or pull requests

2 participants