Skip to content

Add more subscriptable types#44

Merged
timrid merged 1 commit into
mainfrom
add-subconstruct
Jul 23, 2026
Merged

Add more subscriptable types#44
timrid merged 1 commit into
mainfrom
add-subconstruct

Conversation

@timrid

@timrid timrid commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Added Subconstruct, SymmetricAdapter, Tunnel and Validotor to construct_typed as subscriptable types.

@timrid timrid changed the title typed: Add more subscriptable types Add more subscriptable types Jul 22, 2026
@timrid
timrid force-pushed the add-subconstruct branch from bf2fbf7 to 0704c48 Compare July 22, 2026 14:58
@timrid
timrid requested a review from Copilot July 22, 2026 14:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends construct_typed’s runtime-generic wrappers so additional construct base classes can be used as subscriptable generic types (e.g., Tunnel[...], Validator[...]) while keeping type-checker behavior consistent with the stubs.

Changes:

  • Exported new runtime-subscriptable generic wrappers: Subconstruct, SymmetricAdapter, Tunnel, and Validator.
  • Added tests asserting runtime subscriptability for several wrapper types.
  • Documented the new exports in the changelog.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
construct_typed/generic_wrapper.py Adds runtime generic wrapper classes for additional construct types and documents wrapper purpose.
construct_typed/__init__.py Re-exports the new wrapper types as part of the public API.
tests/test_typed.py Adds runtime subscriptability tests for newly supported generic wrappers (with gaps noted in comments).
CHANGELOG.md Notes the new subscriptable wrapper types under [UNRELEASED].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread construct_typed/generic_wrapper.py Outdated
Comment thread tests/test_typed.py
…tor` to `construct_typed` as subscriptable types.
@timrid
timrid force-pushed the add-subconstruct branch from 0704c48 to efce645 Compare July 23, 2026 07:18
@timrid
timrid merged commit 7a9e86d into main Jul 23, 2026
22 checks passed
@timrid
timrid deleted the add-subconstruct branch July 23, 2026 08:48
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.

2 participants