Skip to content

Commit d395689

Browse files
committed
Use the non-deprecated name for EnumType
1 parent aef403c commit d395689

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

sphinx/ext/autodoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ def format_args(self, **kwargs: Any) -> str:
14521452
# These are listed by name, rather than storing the objects themselves, to avoid
14531453
# needing to import the modules.
14541454
_METACLASS_CALL_BLACKLIST = frozenset({
1455-
'enum.EnumMeta.__call__',
1455+
'enum.EnumType.__call__',
14561456
})
14571457

14581458

tests/test_extensions/test_ext_autodoc.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,22 +1561,7 @@ def brief(self, doc: str, *, indent: int = 0, **options: Any) -> list[str]:
15611561
doc
15621562
), f'enumeration class {self.target!r} should have an explicit docstring'
15631563

1564-
if sys.version_info[:2] >= (3, 13) or sys.version_info[:3] >= (3, 12, 3):
1565-
args = (
1566-
'(value, names=<not given>, *values, module=None, '
1567-
'qualname=None, type=None, start=1, boundary=None)'
1568-
)
1569-
elif sys.version_info[:2] >= (3, 12):
1570-
args = (
1571-
'(value, names=None, *values, module=None, '
1572-
'qualname=None, type=None, start=1, boundary=None)'
1573-
)
1574-
else:
1575-
args = (
1576-
'(value, names=None, *, module=None, qualname=None, '
1577-
'type=None, start=1, boundary=None)'
1578-
)
1579-
1564+
args = '(value)'
15801565
return self._node('class', self.name, doc, args=args, indent=indent, **options)
15811566

15821567
def method(

0 commit comments

Comments
 (0)