@@ -1348,6 +1348,11 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
1348
1348
# default
1349
1349
options = {'members' : None }
1350
1350
actual = do_autodoc (app , 'module' , 'target.autodoc_type_aliases' , options )
1351
+ attr2_typeinfo : tuple [str , ...]
1352
+ if sys .version_info >= (3 , 14 , 0 , 'alpha' , 7 ):
1353
+ attr2_typeinfo = ()
1354
+ else :
1355
+ attr2_typeinfo = (' :type: int' ,)
1351
1356
assert list (actual ) == [
1352
1357
'' ,
1353
1358
'.. py:module:: target.autodoc_type_aliases' ,
@@ -1368,7 +1373,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
1368
1373
'' ,
1369
1374
' .. py:attribute:: Foo.attr2' ,
1370
1375
' :module: target.autodoc_type_aliases' ,
1371
- ' :type: int' ,
1376
+ * attr2_typeinfo ,
1372
1377
'' ,
1373
1378
' docstring' ,
1374
1379
'' ,
@@ -1421,6 +1426,10 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
1421
1426
'io.StringIO' : 'my.module.StringIO' ,
1422
1427
}
1423
1428
actual = do_autodoc (app , 'module' , 'target.autodoc_type_aliases' , options )
1429
+ if sys .version_info >= (3 , 14 , 0 , 'alpha' , 7 ):
1430
+ attr2_typeinfo = ()
1431
+ else :
1432
+ attr2_typeinfo = (' :type: myint' ,)
1424
1433
assert list (actual ) == [
1425
1434
'' ,
1426
1435
'.. py:module:: target.autodoc_type_aliases' ,
@@ -1441,7 +1450,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
1441
1450
'' ,
1442
1451
' .. py:attribute:: Foo.attr2' ,
1443
1452
' :module: target.autodoc_type_aliases' ,
1444
- ' :type: myint' ,
1453
+ * attr2_typeinfo ,
1445
1454
'' ,
1446
1455
' docstring' ,
1447
1456
'' ,
0 commit comments