diff --git a/pydoctor/epydoc/markup/_napoleon.py b/pydoctor/epydoc/markup/_napoleon.py index 89d9638ed..d30758aaf 100644 --- a/pydoctor/epydoc/markup/_napoleon.py +++ b/pydoctor/epydoc/markup/_napoleon.py @@ -62,9 +62,6 @@ def _parse_docstring( errors: list[ParseError], docstring_cls: type[GoogleDocstring], ) -> ParsedDocstring: - # TODO: would be best to avoid this import - from pydoctor.model import Attribute - docstring_obj = docstring_cls( docstring, what=self.objclass, diff --git a/pydoctor/epydoc/markup/epytext.py b/pydoctor/epydoc/markup/epytext.py index 5bf37bcf3..414d8c75d 100644 --- a/pydoctor/epydoc/markup/epytext.py +++ b/pydoctor/epydoc/markup/epytext.py @@ -132,7 +132,7 @@ # 4. helpers # 5. testing -from typing import Any, Iterable, List, Optional, Sequence, Set, Union, cast, TYPE_CHECKING +from typing import Any, Iterable, List, Optional, Sequence, Set, Union, cast import re import unicodedata diff --git a/pydoctor/epydoc/markup/plaintext.py b/pydoctor/epydoc/markup/plaintext.py index 88067a1a9..8edef3135 100644 --- a/pydoctor/epydoc/markup/plaintext.py +++ b/pydoctor/epydoc/markup/plaintext.py @@ -12,7 +12,7 @@ __docformat__ = 'epytext en' -from typing import List, Optional, TYPE_CHECKING +from typing import List, Optional from docutils import nodes from twisted.web.template import Tag, tags @@ -21,9 +21,6 @@ from pydoctor.epydoc.docutils import set_node_attributes, new_document -if TYPE_CHECKING: - from pydoctor.model import Documentable - def parse_docstring(docstring: str, errors: List[ParseError]) -> ParsedDocstring: """ Parse the given docstring, which is formatted as plain text; and diff --git a/pydoctor/epydoc/markup/restructuredtext.py b/pydoctor/epydoc/markup/restructuredtext.py index c5b16b627..8e42a1924 100644 --- a/pydoctor/epydoc/markup/restructuredtext.py +++ b/pydoctor/epydoc/markup/restructuredtext.py @@ -45,7 +45,6 @@ from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Sequence, Set, cast if TYPE_CHECKING: from typing import TypeAlias - from pydoctor.model import Documentable import re from docutils import nodes