Add py.typed marker and return type annotations to l402_client.py#19
Closed
mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
Closed
Add py.typed marker and return type annotations to l402_client.py#19mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
Conversation
- Created src/bitcoin_mcp/py.typed (PEP 561 marker) - Added return types to L402Client.close() -> None, __enter__() -> Self, __exit__() -> None - Added return types to L402PaymentRequired.__init__() -> None, L402PriceTooHigh.__init__() -> None - Added 'from __future__ import annotations' and Self import Fixes Bortlesboat#11
Owner
|
Closing this as superseded by #31, which consolidates the open backlog work into one maintainer sweep. Thank you for the contribution and the concrete issue coverage here. |
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.
Summary
Fixes #11
This PR adds the PEP 561
py.typedmarker and completes return type annotations inl402_client.py.Changes
Created
src/bitcoin_mcp/py.typed— empty PEP 561 marker file so type checkers (mypy, pyright) recognize the package as typed.Added return type annotations to
l402_client.py:L402Client.close()→NoneL402Client.__enter__()→SelfL402Client.__exit__()→None(also added proper parameter types)L402PaymentRequired.__init__()→NoneL402PriceTooHigh.__init__()→NoneAdded
from __future__ import annotationsandSelfimport fromtyping.Testing
py.typedfile is included in the package via hatchling's default behavior (packages undersrc/bitcoin_mcp/)Acceptance Criteria
src/bitcoin_mcp/py.typedexists (empty file)l402_client.pyhave complete type annotationspip install -e .