Skip to content

Commit aef403c

Browse files
committed
Convert _METACLASS_CALL_BLACKLIST and _CLASS_NEW_BLACKLIST to sets
1 parent dded1b0 commit aef403c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sphinx/ext/autodoc/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,15 +1451,15 @@ def format_args(self, **kwargs: Any) -> str:
14511451
# Types which have confusing metaclass signatures it would be best not to show.
14521452
# These are listed by name, rather than storing the objects themselves, to avoid
14531453
# needing to import the modules.
1454-
_METACLASS_CALL_BLACKLIST = [
1454+
_METACLASS_CALL_BLACKLIST = frozenset({
14551455
'enum.EnumMeta.__call__',
1456-
]
1456+
})
14571457

14581458

14591459
# Types whose __new__ signature is a pass-through.
1460-
_CLASS_NEW_BLACKLIST = [
1460+
_CLASS_NEW_BLACKLIST = frozenset({
14611461
'typing.Generic.__new__',
1462-
]
1462+
})
14631463

14641464

14651465
class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: ignore[misc]

0 commit comments

Comments
 (0)