Skip to content

Commit cc3646c

Browse files
improvement: Add TupleTypeHint.type
1 parent 9e76350 commit cc3646c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changelog/_unreleased.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[[entries]]
2+
id = "b9c4c42a-55e9-4ddd-9ab3-0eee773fcdc9"
3+
type = "improvement"
4+
description = "Add `TupleTypeHint.type`"
5+
author = "@NiklasRosenstein"

src/typeapi/typehint.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ def _copy_with_args(self, args: "Tuple[Any, ...]") -> "TypeHint":
440440
args = args + (...,)
441441
return super()._copy_with_args(args)
442442

443+
@property
444+
def type(self) -> type:
445+
return tuple
446+
443447
@property
444448
def repeated(self) -> bool:
445449
"""

0 commit comments

Comments
 (0)