Skip to content

Merge develop into infrahub-develop - #1243

Merged
infrahub-github-bot-app[bot] merged 2 commits into
infrahub-developfrom
develop
Aug 13, 2026
Merged

Merge develop into infrahub-develop#1243
infrahub-github-bot-app[bot] merged 2 commits into
infrahub-developfrom
develop

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merging develop into infrahub-develop after merging pull request #1242.


Summary by cubic

Preserves subclass types by annotating Timestamp.add(), Timestamp.subtract(), and Timestamp.add_delta() to return Self instead of Timestamp. Previously callers had to cast; now chaining on subclasses type-checks correctly. Runtime behavior is unchanged.

  • Changes

    • Methods now return Self; they already constructed self.__class__ at runtime.
    • Imports Self from typing_extensions for Python 3.10 support.
    • No behavior or API shape changes beyond type hints.
  • Migration

    • Remove unnecessary casts to Timestamp in subclass callers.
    • No other actions required.

Written for commit 1f846da. Summary will update on new commits.

Review in cubic

ajtmccarty and others added 2 commits August 13, 2026 06:22
)

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
@infrahub-github-bot-app
infrahub-github-bot-app Bot requested a review from a team as a code owner August 13, 2026 13:57
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

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

View logs

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

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           
Flag Coverage Δ
integration-tests 41.55% <0.00%> (+<0.01%) ⬆️
python-3.10 58.22% <0.00%> (ø)
python-3.11 58.22% <0.00%> (ø)
python-3.12 58.22% <0.00%> (ø)
python-3.13 58.22% <0.00%> (+0.01%) ⬆️
python-3.14 58.20% <0.00%> (-0.02%) ⬇️
python-filler-3.12 24.50% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/timestamp.py 82.88% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@infrahub-github-bot-app
infrahub-github-bot-app Bot merged commit e609236 into infrahub-develop Aug 13, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant