Conversation
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.
Description
Adds three convenience methods to
PatentDataClient:get_patent(),get_publication(), andget_pct()for looking up patent file wrappers by patent number, publication number, or PCT number respectively. Also fixessanitize_application_numberto strip leading zeros from PCT serial numbers.Type of Change
Testing
Checklist
Related Issues
Closes #109
Additional Notes
get_patent(patent_number)andget_publication(publication_number)usesearch_applicationswith the appropriate query parameter and return the first result.get_pct(pct_number)auto-detects the input format: PCT application numbers (starting with "PCT") use direct lookup viaget_application_by_number, PCT publication numbers (starting with "WO") use search viapctPublicationNumber_q.sanitize_application_numbernow strips leading zeros from the PCT serial portion (e.g.,PCT/US2025/047756→PCTUS2547756).