From 05ea63b4d15aead4daabe90251f55b5b015d98bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20D=C3=B6rfelt?= Date: Mon, 23 Sep 2024 19:29:44 +0200 Subject: [PATCH] make linter happy --- pyproject.toml | 1 + src/formats/zettelkasten.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6dd9b108..0d748737 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ extra_checks = true disable_error_code = "attr-defined" [[tool.mypy.overrides]] module = [ + "bbcode", "enlighten", "frontmatter", "puremagic", diff --git a/src/formats/zettelkasten.py b/src/formats/zettelkasten.py index fa927ae1..9e830858 100644 --- a/src/formats/zettelkasten.py +++ b/src/formats/zettelkasten.py @@ -14,6 +14,7 @@ def bbcode_to_markdown( bbcode_str: str, ) -> tuple[str, list[imf.NoteLink], list[imf.Resource]]: + # pylint: disable=unused-argument note_links = [] images = [] @@ -130,6 +131,8 @@ def parse_attributes(self, zettel, note_imf: imf.Note): self.logger.warning(f"ignoring attribute {key}={value}") def convert(self, file_or_folder: Path): + # TODO + # pylint: disable=too-many-branches,too-many-locals self.root_path = self.prepare_input(file_or_folder) attachments_folder = file_or_folder.parent / "attachments" @@ -177,7 +180,8 @@ def convert(self, file_or_folder: Path): if images_available: for image in images: image.filename = images_folder / image.filename - # Set manually, because with invalid path its set to False. + # Set manually, because with invalid path it's + # set to False. image.is_image = True note_imf.resources.append(image) case "author":