style: resolve the remaining ruff findings
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / type (pull_request) Has been cancelled
CI / test-headless (macos-latest, 3.10) (pull_request) Has been cancelled
CI / test-headless (macos-latest, 3.11) (pull_request) Has been cancelled
CI / test-headless (macos-latest, 3.12) (pull_request) Has been cancelled
CI / test-headless (ubuntu-latest, 3.10) (pull_request) Has been cancelled
CI / test-headless (ubuntu-latest, 3.11) (pull_request) Has been cancelled
CI / test-headless (ubuntu-latest, 3.12) (pull_request) Has been cancelled
CI / test-headless (windows-latest, 3.10) (pull_request) Has been cancelled
CI / test-headless (windows-latest, 3.11) (pull_request) Has been cancelled
CI / test-headless (windows-latest, 3.12) (pull_request) Has been cancelled
CI / test-gui (pull_request) Has been cancelled
CI / test-integration (macos-latest) (pull_request) Has been cancelled
CI / test-integration (ubuntu-latest) (pull_request) Has been cancelled
CI / test-integration (windows-latest) (pull_request) Has been cancelled

Auto-fixes (UP037, UP038, F401, I001, SIM105, RUF100) plus hand-fixes:
drop the now-unused `Union` imports, annotate mutable class attributes
with ClassVar, raise ValidationError instead of blind Exception in the
zero-length test, delete two dead locals, and bind the per-iteration
grid-builder closures to their loop variables (B023).
This commit is contained in:
smillmorel 2026-09-16 13:20:36 -04:00
commit 61b850bf46
126 changed files with 359 additions and 397 deletions

View file

@ -8,13 +8,11 @@ behaviour is exercised by the Phase 9 pushover tests.
from __future__ import annotations
import math
import pytest
pytest.importorskip("openseespy")
from otko.core import ( # noqa: E402
from otko.core import (
ElasticUniaxial,
FiberSection,
LinearTimeSeries,
@ -26,7 +24,7 @@ from otko.core import ( # noqa: E402
StaticCase,
ZeroLengthSectionElement,
)
from otko.services.opensees_runner import OpenSeesRunner # noqa: E402
from otko.services.opensees_runner import OpenSeesRunner
pytestmark = pytest.mark.slow
@ -134,7 +132,7 @@ def test_pushover_drives_rotation_for_moment_curvature() -> None:
# Every (κ, M) point must satisfy M = E·I·κ (1 % tolerance allows
# for the ~20-fibre discretisation of the rectangular section).
for kappa, moment in zip(result.control_disp, result.base_shear):
for kappa, moment in zip(result.control_disp, result.base_shear, strict=False):
if abs(kappa) < 1e-12:
continue
expected_M = E * I * kappa