Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add is_variadic_tuple to TypeView. #11

Merged
merged 1 commit into from
May 13, 2024

Conversation

DanCardin
Copy link
Collaborator

@DanCardin DanCardin commented May 13, 2024

Description

  • Adds a property to indicate if a tuple is an "arbitrary-length homogeneous tuple" tuple.

I.e. tuple[int, str] and tuple[int, ...] which are distinct kinds of types that have different semantics as far as the type checkers go.

I dont know if there's a canonical name for this or not, is the main consideration in my mind.

@peterschutt
Copy link
Contributor

I dont know if there's a canonical name for this or not, is the main consideration in my mind.

They call it an "arbitrary-length homogeneous tuple" in the pep, but that's obviously too much of a mouthful.

How about is_variadic_tuple?

@DanCardin DanCardin changed the title feat: Add is_bounded_tuple to TypeView. feat: Add is_unbounded_tuple to TypeView. May 13, 2024
@DanCardin
Copy link
Collaborator Author

fine by me!

@DanCardin DanCardin force-pushed the dc/unbounded-tuple branch from b9ac49d to 6c5ea1e Compare May 13, 2024 22:01
@DanCardin DanCardin changed the title feat: Add is_unbounded_tuple to TypeView. feat: Add is_variadic_tuple to TypeView. May 13, 2024
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/type-lens-docs-preview/11

@peterschutt peterschutt merged commit 260545f into litestar-org:main May 13, 2024
9 checks passed
@peterschutt
Copy link
Contributor

Thank you!

@DanCardin DanCardin deleted the dc/unbounded-tuple branch May 13, 2024 23:47
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