diff --git a/pydoctor/astbuilder.py b/pydoctor/astbuilder.py index 218bb5da9..08c744ee7 100644 --- a/pydoctor/astbuilder.py +++ b/pydoctor/astbuilder.py @@ -427,14 +427,12 @@ def _importNames(self, modname: str, names: Iterable[ast.alias]) -> None: orgname, asname = al.name, al.asname if asname is None: asname = orgname - - if mod is not None and self._handleReExport(exports, orgname, asname, mod) is True: - continue - # If we're importing from a package, make sure imported modules # are processed (getProcessedModule() ignores non-modules). if isinstance(mod, model.Package): self.system.getProcessedModule(f'{modname}.{orgname}') + if mod is not None and self._handleReExport(exports, orgname, asname, mod) is True: + continue _localNameToFullName[asname] = f'{modname}.{orgname}' diff --git a/pydoctor/epydoc/markup/restructuredtext.py b/pydoctor/epydoc/markup/restructuredtext.py index 9025083ee..c1c79ccfd 100644 --- a/pydoctor/epydoc/markup/restructuredtext.py +++ b/pydoctor/epydoc/markup/restructuredtext.py @@ -47,7 +47,7 @@ from docutils.core import publish_string from docutils.writers import Writer -from docutils.parsers.rst.directives.admonitions import BaseAdmonition # type: ignore[import] +from docutils.parsers.rst.directives.admonitions import BaseAdmonition # type: ignore[import-untyped] from docutils.readers.standalone import Reader as StandaloneReader from docutils.utils import Reporter from docutils.parsers.rst import Directive, directives