From 6a66e06544f90d8614fa2ac33f3888c769f44aa2 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 3 Apr 2025 01:27:55 +0200 Subject: [PATCH] Add a couple more rules --- novelwriter/core/index.py | 2 +- pyproject.toml | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/novelwriter/core/index.py b/novelwriter/core/index.py index f3178faf..b4bdaba5 100644 --- a/novelwriter/core/index.py +++ b/novelwriter/core/index.py @@ -777,7 +777,7 @@ class TagsIndex: control of the keys. """ - __slots__ = ("_tags") + __slots__ = ("_tags",) def __init__(self) -> None: self._tags: dict[str, dict[str, str]] = {} diff --git a/pyproject.toml b/pyproject.toml index b8073e0f..d22d9bd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,25 +60,29 @@ line-length = 99 [tool.ruff.lint] select = [ - "A", # flake8-builtins (A) - "B", # flake8-bugbear (B) - "E", # pycodestyle (E) - "F", # Pyflakes (F) - "W", # pycodestyle (W) - "UP", + "A", # flake8-builtins (A) + "B", # flake8-bugbear (B) + "E", # pycodestyle (E) + "F", # Pyflakes (F) + "W", # pycodestyle (W) + "UP", # pyupgrade (UP) + "ANN", # flake8-annotations (ANN) + "PLC", # Pylint Convention (PLC) + "PLE", # Pylint Error (PLE) + "FA", # flake8-future-annotations (FA) ] ignore = [ "E221", # multiple-spaces-before-operator "E226", # missing-whitespace-around-arithmetic-operator "E228", # missing-whitespace-around-modulo-operator "E241", # multiple-spaces-after-comma - "ANN401", + "ANN401", # any-type "UP015", # redundant-open-modes "UP030", # format-literals ] [tool.ruff.lint.per-file-ignores] -"tests/*" = [] +"tests/*" = ["ANN"] [tool.ruff.format] quote-style = "double"