From e14080313c7193b5422cd65e5bde7faa184c7500 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 2 Oct 2023 22:19:27 +0200 Subject: [PATCH] fix linking --- .github/workflows/python-package.yml | 1 - papyri/take2.py | 4 ++++ papyri/tree.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0433749a..71e1bd59 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -79,7 +79,6 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - ingest: runs-on: ubuntu-latest diff --git a/papyri/take2.py b/papyri/take2.py index 51a78b51..4871347f 100644 --- a/papyri/take2.py +++ b/papyri/take2.py @@ -225,6 +225,10 @@ class RefInfo(Node): kind: str path: str + def __post_init__(self): + if self.module is not None: + assert "." not in self.module, self.module + def __iter__(self): assert isinstance(self.path, str) return iter([self.module, self.version, self.kind, self.path]) diff --git a/papyri/tree.py b/papyri/tree.py index 6268122f..4c2dd339 100644 --- a/papyri/tree.py +++ b/papyri/tree.py @@ -779,7 +779,7 @@ def replace_Directive(self, directive: Directive): if target_qa is not None: if target_qa.split(".")[0] == self.qa.split("."): assert False, "local reference should have explicit versions" - module = target_qa.split(":")[0] + module = target_qa.split(":")[0].split(".")[0] ri = RefInfo( module=module, version="*",