From: alex Date: Sun, 16 Mar 2025 13:00:32 +0000 (+0100) Subject: Finish ruff cleanup X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=a3e56ad801343697cdc2dda139193f240497973e;p=alex.git Finish ruff cleanup Related to #376 --- diff --git a/blog/pyproject.toml b/blog/pyproject.toml index b1f9c31..6f4e9a3 100644 --- a/blog/pyproject.toml +++ b/blog/pyproject.toml @@ -36,10 +36,10 @@ build-backend = "hatchling.build" [tool.ruff.lint] select = ["ALL"] ignore = [ - "E741", # Ambiguous variable name (single letter variable) - "ANN", # Missing type annotations - "D1", # Missing docstrings - "B011", "PT015", "S101", # I am wrong in liking asserts, but I do - "COM812", # Trailing comma missing, incompatible with ruff format - "D400", "D415", "D212", "D205" # I like doctests without docstrings + "E741", # Ambiguous variable name (single letter variable) + "ANN", # Missing type annotations + "D1", # Missing docstrings + "B011", "PT015", "S101", # I am wrong in liking asserts, but I do + "COM812", # Trailing comma missing, incompatible with ruff format + "D400", "D415", "D212", "D205", "D402", # I like doctests without docstrings ] diff --git a/blog/src/blog/gemtext.py b/blog/src/blog/gemtext.py index 43cffd2..f79be9e 100644 --- a/blog/src/blog/gemtext.py +++ b/blog/src/blog/gemtext.py @@ -125,7 +125,7 @@ class Link: assert Link.is_link(line) parts = line.split(None, 2) self.url = parts[1] - self.text = parts[2] if len(parts) > 2 else None + self.text = parts[2] if len(parts) > 2 else None # noqa: PLR2004, > 2 "magic constant" @staticmethod def is_link(line: str): diff --git a/blog/src/blog/html.py b/blog/src/blog/html.py index c51237c..19fe6ea 100644 --- a/blog/src/blog/html.py +++ b/blog/src/blog/html.py @@ -86,7 +86,7 @@ def html_template(*content, page_title=None, path, full): ) -def gemini_to_html(parsed): +def gemini_to_html(parsed): # noqa: C901, PLR0912, PLR0915 i = 0 result = [] while i < len(parsed):