Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Dec 8, 2024
1 parent d2df665 commit 7a23766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pydoctor/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def _compute_mro(self, cls: Class) -> list[_ClassOrStr]:
This assumes that the MRO of the bases of the class
have already been computed and stored in C{self.computed_mros}.
"""
result = [cls]
result: list[_ClassOrStr] = [cls]

if not (bases:=self.graph[cls]):
return result
Expand Down
4 changes: 2 additions & 2 deletions pydoctor/topsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import annotations

import sys
from typing import TypeVar, TYPE_CHECKING
from typing import Iterable, TypeVar, TYPE_CHECKING

if TYPE_CHECKING:
from typing import TypeAlias
Expand Down Expand Up @@ -261,7 +261,7 @@ def static_order(self):

# API

def topsort(graph: Graph) -> list[T]:
def topsort(graph: Graph[T]) -> Iterable[T]:
"""
Wrapper for L{graphlib.TopologicalSorter.static_order}.
"""
Expand Down

0 comments on commit 7a23766

Please sign in to comment.