From 4aa2c3a3424cda6b26c57ed303881b4ad10d0823 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:14:20 +0100 Subject: [PATCH] enable preview mode --- ruff-strict-pep8.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruff-strict-pep8.toml b/ruff-strict-pep8.toml index a456ad204b..a1bca3d6ed 100644 --- a/ruff-strict-pep8.toml +++ b/ruff-strict-pep8.toml @@ -13,19 +13,25 @@ exclude = [ "src/tinycss/*", ] +preview = true + [format] quote-style = 'single' [lint] +explicit-preview-rules = true ignore = [ 'E402', 'E722', 'E741', 'UP012', 'UP030', 'UP032', 'UP038', 'C413', 'C420', 'RUF001', 'RUF002', 'RUF003', 'RUF005', 'RUF012', 'RUF013', 'RUF015', 'RUF031', 'RUF100', + 'F841', # because in preview, unused tuple unpacking variable that not use dummy syntax (prefix '_' underscore) + # raise error 'unused-variable', sigh (https://github.com/astral-sh/ruff/issues/8884) ] select = [ 'E', 'F', 'I', 'W', 'INT', 'Q', 'UP', 'YTT', 'TID', 'C4', 'COM818', 'RUF', # nota: RUF can flag many unsolicited errors + # preview rules ] [lint.per-file-ignores]