From 09a2f2d5320219a8bbf72223926f35d6ceb03f3b Mon Sep 17 00:00:00 2001 From: phil65 Date: Tue, 10 Oct 2023 18:36:44 +0200 Subject: [PATCH] chore: misc --- mknodes/pages/metadata.py | 2 +- mknodes/templatenodes/mkcallable.py | 2 +- mknodes/utils/annotationappender.py | 2 +- mknodes/utils/linkreplacer.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mknodes/pages/metadata.py b/mknodes/pages/metadata.py index aa8ea78d..182d1140 100644 --- a/mknodes/pages/metadata.py +++ b/mknodes/pages/metadata.py @@ -86,7 +86,7 @@ def status(self) -> datatypes.PageStatusStr | None: MkDocs-Material supports `"new"`, `"deprecated"` and `"encrypted"` by default by showing an icon in the site nav. Additional icons can be added during the build process via - [MaterialTheme.add_status_icon][mknodes.theme.materialtheme.MaterialTheme.add_status_icon]. + [MaterialTheme.add_status_icon][mknodes.MaterialTheme.add_status_icon]. """ return self.get("status") diff --git a/mknodes/templatenodes/mkcallable.py b/mknodes/templatenodes/mkcallable.py index 4920e28c..9d68066e 100644 --- a/mknodes/templatenodes/mkcallable.py +++ b/mknodes/templatenodes/mkcallable.py @@ -49,7 +49,7 @@ def __init__( self.args = args or [] self.kw_args = kw_args or {} - def __call__(self): + def __call__(self) -> mk.MkNode: node = self.fn(*self.args, **self.kw_args) node.parent = self.parent return node diff --git a/mknodes/utils/annotationappender.py b/mknodes/utils/annotationappender.py index b9936a27..118444d7 100644 --- a/mknodes/utils/annotationappender.py +++ b/mknodes/utils/annotationappender.py @@ -21,7 +21,7 @@ def __init__(self): self.count = 0 self.matches = [] - def __call__(self, match): + def __call__(self, match) -> str: line = match.group() self.count += 1 self.matches.append((self.count, match.group(2))) diff --git a/mknodes/utils/linkreplacer.py b/mknodes/utils/linkreplacer.py index 2ab81ead..e668b80f 100644 --- a/mknodes/utils/linkreplacer.py +++ b/mknodes/utils/linkreplacer.py @@ -27,7 +27,7 @@ def __init__(self): self.mapping = collections.defaultdict(list) self.page_url = "" - def __call__(self, match): + def __call__(self, match) -> str: filename = urllib.parse.unquote(match.group(3).strip()) if filename not in self.mapping: return f"`{match.group(1)}`"