Repository navigation
fix: add py.typed marker for PEP 561 support - #16
Merged
Koukyosyumei merged 3 commits intoAug 5, 2026
Merged
Conversation
- Sort __all__ lists alphabetically (RUF022) - Convert Union to | syntax for type annotations (UP007) - Change ValueError to TypeError for type validation (TRY004) - Use Self for __aenter__ return type (PYI034) - Add noqa comments for intentional blind exception catches (BLE001, S110) - Add explicit check=False to subprocess.run calls (PLW1510) - Prefix unused variables with underscore (RUF059) - Wrap implicit string concatenations in parentheses (ISC004) - Add unused imports to __all__ (F401) - Remove unused imports (F401) - Auto-fix import sorting and formatting
Contributor
Author
|
Want me to resolve these ruff errors as well? @Koukyosyumei |
Contributor
|
@knight22-21 yes, it would be really great!! Thank you so much! |
Contributor
Author
|
You can check it now, I have completed the necessary changes. @Koukyosyumei |
- Add UTF-8 encoding to Path.read_text() calls in test_examples.py to fix UnicodeDecodeError on Windows - Use concrete class name Conductor instead of Self for __aenter__ return type (Python 3.10 compatibility) - Add noqa: PYI034 comment to suppress Ruff warning for intentional deviation - Keep zero runtime dependencies for Python 3.10+ compatibility
Contributor
|
LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Add
py.typedmarker so downstream type checkers see SDK annotationsSummary
The SDK is fully type-annotated, but without a PEP 561
py.typedmarker, type checkers such asmypyandpyrighttreath5i.orchestraas an untyped package. As a result, downstream projects lose signature validation and typed editor completions despite the annotations already present in the SDK.This PR adds the required
py.typedmarker, ensures it is included in the built wheel, and extends package CI to verify that installed consumers can resolve the distributed type information.Related Issue
Fixes #13
Changes
src/h5i/py.typed(PEP 561 typed-package marker)h5i/py.typedis included in the built wheel:mypysmoke test against the installed wheel:python -m mypy -c "from h5i.orchestra import Conductor; reveal_type(Conductor)"mypy>=1.8toproject.optional-dependencies.devTest Plan
python -m buildproduces a wheel containingh5i/py.typedmypysmoke check;Conductorreveals its full constructor signaturemypysmoke test)