Merge develop into infrahub-develop - #1243
Merged
Merged
Conversation
) add(), subtract() and add_delta() all construct self.__class__, so a subclass gets an instance of itself back at runtime. The annotations said Timestamp, so subclasses (such as Infrahub's own Timestamp) had to cast before touching anything they add on top. Self comes from typing_extensions rather than typing, since typing.Self is 3.11+ and the SDK supports 3.10. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Merge stable into develop
Deploying infrahub-sdk-python with
|
| Latest commit: |
1f846da
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4642f8e1.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://develop.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #1243 +/- ##
=================================================
Coverage 85.18% 85.18%
=================================================
Files 147 147
Lines 15786 15786
Branches 2707 2707
=================================================
Hits 13447 13447
Misses 1673 1673
Partials 666 666
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
infrahub-github-bot-app
Bot
merged commit Aug 13, 2026
e609236
into
infrahub-develop
36 checks passed
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.
Merging develop into infrahub-develop after merging pull request #1242.
Summary by cubic
Preserves subclass types by annotating
Timestamp.add(),Timestamp.subtract(), andTimestamp.add_delta()to returnSelfinstead ofTimestamp. Previously callers had to cast; now chaining on subclasses type-checks correctly. Runtime behavior is unchanged.Changes
Self; they already constructedself.__class__at runtime.Selffromtyping_extensionsfor Python 3.10 support.Migration
Timestampin subclass callers.Written for commit 1f846da. Summary will update on new commits.