diff --git a/papyri/ascii.tpl.j2 b/papyri/ascii.tpl.j2 index def99fdb..47cebab0 100644 --- a/papyri/ascii.tpl.j2 +++ b/papyri/ascii.tpl.j2 @@ -138,8 +138,8 @@ {{-green("green")}} refer to items within the same document, {{blue("blue")}} external {{underline("known")}} entities, {{red("red")}} entities we were not able to find and {{yellow("yellow")}} for code, and other "raw" items, typically between double backticks. -{% if doc.signature %} - |{{ bold(underline(doc.signature.value))}} +{% if doc.textsignature %} + |{{name}}{{ bold(underline(doc.textsignature.value))}} {% endif %} {% for section in doc.content if doc.content[section] %} diff --git a/papyri/render.py b/papyri/render.py index 1f71602d..20f42cda 100644 --- a/papyri/render.py +++ b/papyri/render.py @@ -573,7 +573,6 @@ def render_one( current_type=current_type, doc=doc, logo=meta.get("logo", None), - qa=qa, version=meta["version"], module=qa.split(".")[0], name=qa.split(":")[-1].split(".")[-1], @@ -653,8 +652,8 @@ async def _route_data(self, ref, version, known_refs): async def _route( self, - ref, - version=None, + ref: str, + version: str = None, ): assert not ref.endswith(".html") assert version is not None @@ -781,11 +780,12 @@ async def _copy_dir(self, src_dir: Path, dest_dir: Path): async def copy_static(self, output_dir): here = Path(os.path.dirname(__file__)) _static = here / "static" - output_dir.mkdir(exist_ok=True) - static = output_dir.parent / "static" - static.mkdir(exist_ok=True) - await self._copy_dir(_static, static) - (static / "pygments.css").write_bytes(await pygment_css().get_data()) + if output_dir is not None: + output_dir.mkdir(exist_ok=True) + static = output_dir.parent / "static" + static.mkdir(exist_ok=True) + await self._copy_dir(_static, static) + (static / "pygments.css").write_bytes(await pygment_css().get_data()) async def copy_assets(self, config): """ @@ -1184,7 +1184,7 @@ def old_render_one( current_type=current_type, doc=doc, logo=meta.get("logo", None), - qa=qa, + name=qa.split(":")[-1].split(".")[-1], version=meta["version"], module=qa.split(".")[0], backrefs=backrefs,