Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for a resale origin on gifts and introduces a new next_transfer_date field across gift-related models.
- Extend
UniqueGiftInfoOriginwithRESALEand add corresponding fields (last_resale_star_count,next_transfer_date) - Update
UniqueGiftInfo,OwnedGiftUnique, and related JSON (de)serialization to handle the new fields - Enhance tests to cover the new fields and enum conversion
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_uniquegift.py | Added assertions for last_resale_star_count and next_transfer_date, plus an enum type test |
| tests/test_ownedgift.py | Added next_transfer_date assertions and removed unused import |
| src/telegram/constants.py | Introduced RESALE in UniqueGiftInfoOrigin |
| src/telegram/_uniquegift.py | Added last_resale_star_count & next_transfer_date handling |
| src/telegram/_ownedgift.py | Added next_transfer_date handling for OwnedGiftUnique |
Comments suppressed due to low confidence (2)
src/telegram/constants.py:3215
- [nitpick] Consider adding a period at the end of this docstring description for consistency with other enum entries.
""":obj:`str` gift bought from other users
tests/test_uniquegift.py:390
- Add a dedicated test case for the RESALE origin to verify
last_resale_star_countis parsed and serialized correctly when origin is RESALE.
last_resale_star_count=UniqueGiftInfoTestBase.last_resale_star_count,
Bibo-Joshi
requested changes
Jul 4, 2025
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
thanks very much for the PR! just one comment
Bibo-Joshi
approved these changes
Jul 4, 2025
Member
|
merge at will :) (poor [lucky?] Will …) |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Part of #4845