Skip to content

Commit 18cc082

Browse files
committed
Cover undocummented Pep695 aliases
1 parent 5d0ad16 commit 18cc082

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/roots/test-ext-autodoc/target/pep695.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class Foo:
2222
type Pep695Alias = Foo
2323
"""This is PEP695 type alias."""
2424

25+
type Pep695AliasUndoced = Foo
26+
2527
TypeAliasTypeExplicit = TypeAliasType('TypeAliasTypeExplicit', Foo) # NoQA: UP040
2628
"""This is an explicitly constructed typing.TypeAlias."""
2729

tests/test_ext_autodoc/test_ext_autodoc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,6 +2292,12 @@ def test_autodoc_pep695_type_alias() -> None:
22922292
' This is PEP695 type alias of PEP695 alias.',
22932293
'',
22942294
'',
2295+
# Undocumented alias should not inherit any documentations
2296+
'.. py:type:: Pep695AliasUndoced',
2297+
' :module: target.pep695',
2298+
' :canonical: ~target.pep695.Foo',
2299+
'',
2300+
'',
22952301
'.. py:type:: Pep695AliasUnion',
22962302
' :module: target.pep695',
22972303
' :canonical: str | int',

0 commit comments

Comments
 (0)