From 184bb4662bd6e1b74d7e5c7bc7b64f0a927ec3d6 Mon Sep 17 00:00:00 2001 From: smillmorel Date: Wed, 16 Sep 2026 13:20:36 -0400 Subject: [PATCH] chore: scope ruff ignores to tests, Qt and engineering notation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RUF001-003 are ignored repo-wide: × / ≈ / ² are deliberate in the engineering docs and formulas, which also makes the scattered inline noqa suppressions redundant. Tests use engineering symbols (A, I, L, E), `importorskip` before imports and capitalised test names; Qt requires camelCase signal names and PascalCase event overrides; OpenSees material fields (cR1, epsU) mirror the solver verbatim. N806 stays exempt only for the numeric modules that use L / Iz / Iy as symbols. --- pyproject.toml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5e1e4bf..ffab17d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,25 @@ select = [ "SIM", # simplify "RUF", # ruff-specific ] -ignore = ["E501"] # line length handled by formatter +ignore = [ + "E501", # line-length handled by the formatter + "RUF001", # ambiguous unicode: engineering notation (×, ≈, ²) is deliberate + "RUF002", + "RUF003", +] + +[tool.ruff.lint.per-file-ignores] +# Engineering symbols (A, I, L, E, P) and `importorskip`-then-import blocks +# are normal in tests. +"tests/**" = ["E402", "E741", "N802", "N806", "N815"] +# Qt requires camelCase signal names and PascalCase event overrides. +"src/otko/views/**" = ["N802", "N815"] +"src/otko/viewmodels/**" = ["N815"] +# Material fields mirror the OpenSees parameter names verbatim (cR1, epsU, ...). +"src/otko/core/materials/__init__.py" = ["N815"] +# Engineering symbols in numeric code: L (length), Iz/Iy (second moments). +"src/otko/services/section_properties.py" = ["N806"] +"src/otko/views/canvas3d/model_renderer.py" = ["N802", "N806", "N815"] [tool.ruff.format] quote-style = "double"