File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
roots/test-ext-autodoc/target Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ class Foo:
2222type Pep695Alias = Foo
2323"""This is PEP695 type alias."""
2424
25+ type Pep695AliasUndoced = Foo
26+
2527TypeAliasTypeExplicit = TypeAliasType ('TypeAliasTypeExplicit' , Foo ) # NoQA: UP040
2628"""This is an explicitly constructed typing.TypeAlias."""
2729
Original file line number Diff line number Diff 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' ,
You can’t perform that action at this time.
0 commit comments