Skip to content

Commit

Permalink
Partially revert 3496de6
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jan 23, 2025
1 parent 1b1dcd7 commit 3b04faa
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions tests/test_extensions/test_ext_autodoc_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,6 @@ def test_mocked_module_imports(app):
confoverrides={'autodoc_typehints': 'signature'},
)
def test_autodoc_typehints_signature(app):
if sys.version_info[:2] >= (3, 13):
type_ppp = 'pathlib._local.PurePosixPath'
else:
type_ppp = 'pathlib.PurePosixPath'

options = {
'members': None,
'undoc-members': None,
Expand All @@ -726,7 +721,7 @@ def test_autodoc_typehints_signature(app):
'',
'.. py:data:: CONST3',
' :module: target.typehints',
f' :type: ~{type_ppp}',
' :type: ~pathlib.PurePosixPath',
" :value: PurePosixPath('/a/b/c')",
'',
' docstring',
Expand All @@ -749,7 +744,7 @@ def test_autodoc_typehints_signature(app):
'',
' .. py:attribute:: Math.CONST3',
' :module: target.typehints',
f' :type: ~{type_ppp}',
' :type: ~pathlib.PurePosixPath',
" :value: PurePosixPath('/a/b/c')",
'',
'',
Expand All @@ -771,7 +766,7 @@ def test_autodoc_typehints_signature(app):
'',
' .. py:property:: Math.path',
' :module: target.typehints',
f' :type: ~{type_ppp}',
' :type: ~pathlib.PurePosixPath',
'',
'',
' .. py:property:: Math.prop',
Expand All @@ -796,7 +791,7 @@ def test_autodoc_typehints_signature(app):
'',
' docstring',
'',
f" alias of TypeVar('T', bound=\\ :py:class:`~{type_ppp}`)",
" alias of TypeVar('T', bound=\\ :py:class:`~pathlib.PurePosixPath`)",
'',
'',
'.. py:function:: complex_func(arg1: str, arg2: List[int], arg3: Tuple[int, '
Expand Down Expand Up @@ -828,10 +823,6 @@ def test_autodoc_typehints_signature(app):
confoverrides={'autodoc_typehints': 'none'},
)
def test_autodoc_typehints_none(app):
if sys.version_info[:2] >= (3, 13):
type_ppp = 'pathlib._local.PurePosixPath'
else:
type_ppp = 'pathlib.PurePosixPath'
options = {
'members': None,
'undoc-members': None,
Expand Down Expand Up @@ -919,7 +910,7 @@ def test_autodoc_typehints_none(app):
'',
' docstring',
'',
f" alias of TypeVar('T', bound=\\ :py:class:`~{type_ppp}`)",
" alias of TypeVar('T', bound=\\ :py:class:`~pathlib.PurePosixPath`)",
'',
'',
'.. py:function:: complex_func(arg1, arg2, arg3=None, *args, **kwargs)',
Expand Down Expand Up @@ -1511,10 +1502,6 @@ def test_autodoc_typehints_description_and_type_aliases(app):
confoverrides={'autodoc_typehints_format': 'fully-qualified'},
)
def test_autodoc_typehints_format_fully_qualified(app):
if sys.version_info[:2] >= (3, 13):
type_ppp = 'pathlib._local.PurePosixPath'
else:
type_ppp = 'pathlib.PurePosixPath'
options = {
'members': None,
'undoc-members': None,
Expand All @@ -1540,7 +1527,7 @@ def test_autodoc_typehints_format_fully_qualified(app):
'',
'.. py:data:: CONST3',
' :module: target.typehints',
f' :type: {type_ppp}',
' :type: pathlib.PurePosixPath',
" :value: PurePosixPath('/a/b/c')",
'',
' docstring',
Expand All @@ -1563,7 +1550,7 @@ def test_autodoc_typehints_format_fully_qualified(app):
'',
' .. py:attribute:: Math.CONST3',
' :module: target.typehints',
f' :type: {type_ppp}',
' :type: pathlib.PurePosixPath',
" :value: PurePosixPath('/a/b/c')",
'',
'',
Expand All @@ -1585,7 +1572,7 @@ def test_autodoc_typehints_format_fully_qualified(app):
'',
' .. py:property:: Math.path',
' :module: target.typehints',
f' :type: {type_ppp}',
' :type: pathlib.PurePosixPath',
'',
'',
' .. py:property:: Math.prop',
Expand All @@ -1610,7 +1597,7 @@ def test_autodoc_typehints_format_fully_qualified(app):
'',
' docstring',
'',
f" alias of TypeVar('T', bound=\\ :py:class:`{type_ppp}`)",
" alias of TypeVar('T', bound=\\ :py:class:`pathlib.PurePosixPath`)",
'',
'',
'.. py:function:: complex_func(arg1: str, arg2: List[int], arg3: Tuple[int, '
Expand Down

0 comments on commit 3b04faa

Please sign in to comment.