diff --git a/pydoctor/model.py b/pydoctor/model.py index b89b78e4d..52bb77f53 100644 --- a/pydoctor/model.py +++ b/pydoctor/model.py @@ -9,7 +9,6 @@ import abc import ast -from functools import partial from itertools import chain from collections import defaultdict import datetime diff --git a/pydoctor/mro.py b/pydoctor/mro.py index db63a86bf..30997712f 100644 --- a/pydoctor/mro.py +++ b/pydoctor/mro.py @@ -27,7 +27,7 @@ from collections import deque from itertools import islice -from typing import Callable, List, Tuple, Optional, TypeVar +from typing import List, Tuple, Optional, TypeVar T = TypeVar('T') diff --git a/pydoctor/test/test_mro.py b/pydoctor/test/test_mro.py index ac221a088..17b910e55 100644 --- a/pydoctor/test/test_mro.py +++ b/pydoctor/test/test_mro.py @@ -1,5 +1,4 @@ from typing import List, Optional, Type -import pytest from pydoctor import model, stanutils from pydoctor.templatewriter import pages, util diff --git a/pydoctor/topsort.py b/pydoctor/topsort.py index 0f59f6760..729a4868e 100644 --- a/pydoctor/topsort.py +++ b/pydoctor/topsort.py @@ -8,7 +8,7 @@ from typing import TypeAlias T = TypeVar('T') -Graph = TypeAlias = dict[T, list[T]] +Graph: TypeAlias = dict[T, list[T]] if sys.version_info >= (3, 9): from graphlib import TopologicalSorter, CycleError @@ -113,7 +113,7 @@ def prepare(self): # nodes as possible before cycles block more progress cycle = self._find_cycle() if cycle: - raise CycleError(f"nodes are in a cycle", cycle) + raise CycleError("nodes are in a cycle", cycle) def get_ready(self): """Return a tuple of all the nodes that are ready.