From 16bc2dc60a0c9742aa9da4d41db4b6673346528d Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 31 Oct 2025 13:55:28 -0400 Subject: [PATCH] Update Ruff to >=0.13 and simplify configs --- pyproject.toml | 2 ++ ruff.toml | 18 ++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e916f46b..65b76203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,8 @@ doc = [ check = [ "pytest-checkdocs >= 2.4", "pytest-ruff >= 0.2.1; sys_platform != 'cygwin'", + # Deprecated rules must now be selected by exact rule code + "ruff >= 0.13; sys_platform != 'cygwin'", ] cover = [ diff --git a/ruff.toml b/ruff.toml index 63c0825f..c6f77c6b 100644 --- a/ruff.toml +++ b/ruff.toml @@ -11,35 +11,25 @@ extend-select = [ "FA", # flake8-future-annotations "F404", # late-future-import "PYI", # flake8-pyi - "UP006", # non-pep585-annotation - "UP007", # non-pep604-annotation - "UP010", # unnecessary-future-import - "UP035", # deprecated-import - "UP037", # quoted-annotation - "UP043", # unnecessary-default-type-args + + # Code modernization (strings, annotations, conditions, ...) + "UP", # pyupgrade # local ] ignore = [ # upstream + "UP015", # redundant-open-modes, explicit is preferred # Typeshed rejects complex or non-literal defaults for maintenance and testing reasons, # irrelevant to this project. "PYI011", # typed-argument-default-in-stub # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", - "E111", - "E114", - "E117", "D206", "D300", - "Q000", - "Q001", - "Q002", - "Q003", "COM812", "COM819", - # local ]