Skip to content

Commit

Permalink
Make _init_finalbaseobjects a classmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr authored Jan 29, 2025
1 parent 63a2044 commit d9d091b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pydoctor/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,8 @@ class ClassHierarchyFinalizer:
Encapsulate code related to class hierarchies post-processing.
"""

@staticmethod
def _init_finalbaseobjects(o: Class, path:list[Class] | None = None) -> None:
@classmethod
def _init_finalbaseobjects(cls, o: Class, path:list[Class] | None = None) -> None:
"""
The base objects are computed in two passes, first the ast visitor sets C{_initialbaseobjects},
then we set C{_finalbaseobjects} from this function which should be called during post-processing.
Expand Down Expand Up @@ -628,7 +628,7 @@ def _init_finalbaseobjects(o: Class, path:list[Class] | None = None) -> None:
finalbases.append(o._initialbases[i])
if base:
# Recurse on super classes
ClassHierarchyFinalizer._init_finalbaseobjects(base, path.copy())
cls._init_finalbaseobjects(base, path.copy())
o._finalbaseobjects = finalbaseobjects
o._finalbases = finalbases

Expand Down

0 comments on commit d9d091b

Please sign in to comment.