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

chore: adding py.typed file to iota_sdk python package #1495

Merged
merged 2 commits into from
Oct 24, 2023
Merged

chore: adding py.typed file to iota_sdk python package #1495

merged 2 commits into from
Oct 24, 2023

Conversation

bpshaver
Copy link
Contributor

Description of change

This signals to static type checkers like mypy to use the type hints included in the source code=

Links to any relevant issues

Fixes #1493

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality) - Adds support for type checking for downstream users of the iota_sdk Python package

How the change has been tested

Install mypy and run it on a Python file depending on iota_sdk.

Before the change:

$ echo "from iota_sdk import Wallet" > foo.py && mypy foo.py
foo.py:1: error: Skipping analyzing "iota_sdk": module is installed, but missing library stubs or py.typed marker  [import-untyped]
foo.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
$ echo "from iota_sdk import Wallet" > foo.py && mypy foo.py
Success: no issues found in 1 source file

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • [ x ] I have followed the contribution guidelines for this project
  • [ x ] I have performed a self-review of my own code

This signals to static type checkers like mypy to use the type hints included in the source code

Signed-off-by: Ben Shaver <[email protected]>
Thoralf-M
Thoralf-M previously approved these changes Oct 24, 2023
Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

@thibault-martinez thibault-martinez merged commit 02be942 into iotaledger:develop Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add py.typed file
3 participants