chore: scope ruff ignores to tests, Qt and engineering notation
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.
This commit is contained in:
parent
1f39cff5b0
commit
184bb4662b
1 changed files with 19 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue