Skip to content

Commit

Permalink
Babysit mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Dec 9, 2024
1 parent 0b6fa3a commit c838a65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydoctor/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ def _compute_mro(self, cls: Class) -> list[ClassOrStr]:
# support documenting typing.py module by using allobject.get.
generic = cls.system.allobjects.get(d:='typing.Generic', d)
if generic in bases and any(generic in _mro for _mro in bases_mros):
bases.remove(generic)
# this is cafe since we checked 'generic in bases'.
bases.remove(generic) # type: ignore[arg-type]

try:
return result + mro.c3_merge(*bases_mros, bases)
Expand Down

0 comments on commit c838a65

Please sign in to comment.