Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Sep 27, 2023
1 parent 6a7616b commit 86611ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions papyri/ascii.tpl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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] %}
Expand Down
18 changes: 9 additions & 9 deletions papyri/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 86611ef

Please sign in to comment.