mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
Add type[T] support to typing.h (#5166)
* add type[T] * style: pre-commit fixes * fix merge --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
68405a1141
commit
7c4ac91d75
@@ -957,6 +957,10 @@ def test_fn_annotations(doc):
|
||||
)
|
||||
|
||||
|
||||
def test_type_annotation(doc):
|
||||
assert doc(m.annotate_type) == "annotate_type(arg0: type[int]) -> None"
|
||||
|
||||
|
||||
def test_union_annotations(doc):
|
||||
assert (
|
||||
doc(m.annotate_union)
|
||||
|
||||
Reference in New Issue
Block a user