From 6ebf044f7652fafdaa660b67fb1f12e2cc83918c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Sat, 23 Mar 2024 15:07:38 +0100 Subject: [PATCH] chore: consider "TCH" as safe fix (cherry picked from commit 6c36e5a16131ab69ebdd7fdea7f1a8ccbb126526) --- pyproject.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 83792f48990..06271d0c199 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,9 +102,6 @@ src = ["src"] target-version = "py38" [tool.ruff.lint] -unfixable = [ - "ERA", # do not autoremove commented out code -] extend-select = [ "B", # flake8-bugbear "C4", # flake8-comprehensions @@ -124,6 +121,12 @@ ignore = [ "B905", # use explicit 'strict=' parameter with 'zip()' "N818", # Exception name should be named with an Error suffix ] +extend-safe-fixes = [ + "TCH", # move import from and to TYPE_CHECKING blocks +] +unfixable = [ + "ERA", # do not autoremove commented out code +] [tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all"