From 29e0e20b4facb83935f7c27cab6e6c7c5a529013 Mon Sep 17 00:00:00 2001 From: Philipp Temminghoff Date: Tue, 22 Oct 2024 05:27:00 +0200 Subject: [PATCH] chore: typing --- mknodes/utils/color.py | 2 +- pyproject.toml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mknodes/utils/color.py b/mknodes/utils/color.py index 7e8973db..686ba856 100644 --- a/mknodes/utils/color.py +++ b/mknodes/utils/color.py @@ -41,7 +41,7 @@ def __init__( case _: raise TypeError(color) - def __str__(self): + def __str__(self) -> str: # type: ignore[override] """Return str in form of rgb(255, 0, 0).""" return self.to_string(comma=True) diff --git a/pyproject.toml b/pyproject.toml index 546f5e43..c268acfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,6 +139,12 @@ filter-commits = "v0.30.0.." [tool.ruff] line-length = 90 +extend-exclude = [ + 'docs', +] +target-version = "py311" + +[tool.ruff.lint] select = [ "A", # Flake8-builtins # "ANN", # Flake8-Annotations @@ -234,10 +240,6 @@ ignore = [ "TRY003", # Avoid specifying long messages outside the exception class "COM812", "COM819", "D206", "E501", "ISC001", "Q000", "Q001", "Q002", "Q003", "W191", # for ruff-format ] -extend-exclude = [ - 'docs', -] -target-version = "py311" [tool.ruff.format] # Enable preview style formatting. @@ -249,7 +251,7 @@ docstring-quotes = "double" [tool.ruff.lint.isort] lines-after-imports = 2 -lines-between-types = 1 +# lines-between-types = 1 # atomic = true force-sort-within-sections = true combine-as-imports = true