Skip to content

Commit da45e73

Browse files
committed
REF: Remove __slots__ as Python has gotten leaner
Refs #336
1 parent 0e17bd1 commit da45e73

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Diff for: pdoc/__init__.py

-10
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ class Doc:
517517
also correspond to unexported members of the module, particularly in
518518
a class's ancestor list.)
519519
"""
520-
__slots__ = ('module', 'name', 'obj', 'docstring', 'inherits')
521520

522521
def __init__(self, name: str, module, obj, docstring: str = ''):
523522
"""
@@ -649,9 +648,6 @@ class Module(Doc):
649648
it was imported from. It is always an absolute import path.
650649
"""
651650

652-
__slots__ = ('supermodule', 'doc', '_context', '_is_inheritance_linked',
653-
'_skipped_submodules')
654-
655651
def __init__(self, module: Union[ModuleType, str], *,
656652
docfilter: Optional[Callable[[Doc], bool]] = None,
657653
supermodule: Optional['Module'] = None,
@@ -1035,8 +1031,6 @@ class Class(Doc):
10351031
"""
10361032
Representation of a class' documentation.
10371033
"""
1038-
__slots__ = ('doc', '_super_members')
1039-
10401034
def __init__(self, name: str, module: Module, obj, *, docstring: Optional[str] = None):
10411035
assert inspect.isclass(obj)
10421036

@@ -1375,8 +1369,6 @@ class Function(Doc):
13751369
"""
13761370
Representation of documentation for a function or method.
13771371
"""
1378-
__slots__ = ('cls',)
1379-
13801372
def __init__(self, name: str, module: Module, obj, *, cls: Optional[Class] = None):
13811373
"""
13821374
Same as `pdoc.Doc`, except `obj` must be a
@@ -1648,8 +1640,6 @@ class Variable(Doc):
16481640
Representation of a variable's documentation. This includes
16491641
module, class, and instance variables.
16501642
"""
1651-
__slots__ = ('cls', 'instance_var', 'kind')
1652-
16531643
def __init__(self, name: str, module: Module, docstring, *,
16541644
obj=None, cls: Optional[Class] = None, instance_var: bool = False,
16551645
kind: Literal["prop", "var"] = 'var'):

0 commit comments

Comments
 (0)