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
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:
parent
184bb4662b
commit
61b850bf46
126 changed files with 359 additions and 397 deletions
|
|
@ -6,12 +6,12 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddAnalysisCasesCommand,
|
||||
DeleteAnalysisCasesCommand,
|
||||
UpdateAnalysisCaseCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
LinearTimeSeries,
|
||||
ModalCase,
|
||||
NodalLoad,
|
||||
|
|
@ -20,7 +20,7 @@ from otko.core import ( # noqa: E402
|
|||
StaticCase,
|
||||
TransientCase,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
def _vm_with_pattern() -> ProjectViewModel:
|
||||
|
|
|
|||
|
|
@ -12,21 +12,21 @@ import pytest
|
|||
pytest.importorskip("PySide6")
|
||||
pytest.importorskip("openseespy.opensees")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddAnalysisCasesCommand,
|
||||
AddElementsCommand,
|
||||
AddNodalLoadsCommand,
|
||||
AddNodesCommand,
|
||||
AddSectionsCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticBeamColumn,
|
||||
ElasticSection,
|
||||
Node,
|
||||
StaticCase,
|
||||
)
|
||||
from otko.services.results import StaticResults # noqa: E402
|
||||
from otko.viewmodels import AnalysisRunner, ProjectViewModel # noqa: E402
|
||||
from otko.services.results import StaticResults
|
||||
from otko.viewmodels import AnalysisRunner, ProjectViewModel
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
|
|
@ -6,15 +6,14 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import AddNodalLoadsCommand # noqa: E402
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.commands import AddNodalLoadsCommand
|
||||
from otko.core import (
|
||||
LinearTimeSeries,
|
||||
Node,
|
||||
PlainLoadPattern,
|
||||
Project,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.views.dialogs.assign_load import AssignLoadDialog # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
from otko.views.dialogs.assign_load import AssignLoadDialog
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.views.dialogs.assign_masses import AssignMassesDialog # noqa: E402
|
||||
from otko.views.dialogs.assign_masses import AssignMassesDialog
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticSection,
|
||||
Node,
|
||||
Project,
|
||||
)
|
||||
from otko.views.dialogs.assign_zls import ( # noqa: E402
|
||||
from otko.views.dialogs.assign_zls import (
|
||||
AssignZeroLengthSectionDialog,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
CoordinateGridSystem,
|
||||
CoordinateSystem,
|
||||
GridSystem,
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
NodalLoad,
|
||||
PlainLoadPattern,
|
||||
StaticCase,
|
||||
TransientCase,
|
||||
)
|
||||
from otko.views.dialogs.case_forms import TransientCaseForm # noqa: E402
|
||||
from otko.views.dialogs.case_forms import TransientCaseForm
|
||||
|
||||
|
||||
def _patterns(): # type: ignore[no-untyped-def]
|
||||
|
|
|
|||
|
|
@ -11,15 +11,14 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddElementsCommand,
|
||||
AddNodalLoadsCommand,
|
||||
AddNodesCommand,
|
||||
DeleteElementsCommand,
|
||||
DeleteNodesCommand,
|
||||
SetRestraintCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
LinearTimeSeries,
|
||||
NodalLoad,
|
||||
Node,
|
||||
|
|
@ -27,7 +26,7 @@ from otko.core import ( # noqa: E402
|
|||
Steel01,
|
||||
TrussElement,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
# ─────────────────────────── helpers ────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -6,21 +6,21 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddElementsCommand,
|
||||
AddMaterialsCommand,
|
||||
AddNodesCommand,
|
||||
AddSectionsCommand,
|
||||
ConvertElementTypeCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticBeamColumn,
|
||||
ElasticSection,
|
||||
ElasticUniaxial,
|
||||
Node,
|
||||
TrussElement,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
def _vm_setup() -> ProjectViewModel:
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import LinearTimeSeries, Project # noqa: E402
|
||||
from otko.views.dialogs.linear_time_series import LinearTimeSeriesDialog # noqa: E402
|
||||
from otko.views.dialogs.plain_pattern import PlainPatternDialog # noqa: E402
|
||||
from otko.core import LinearTimeSeries, Project
|
||||
from otko.views.dialogs.linear_time_series import LinearTimeSeriesDialog
|
||||
from otko.views.dialogs.plain_pattern import PlainPatternDialog
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import AddNodesCommand # noqa: E402
|
||||
from otko.core import ElasticBeamColumn, ElasticSection, Node # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.views.canvas3d import SelectionState # noqa: E402
|
||||
from otko.views.tools.draw_frame import DrawFrameTool # noqa: E402
|
||||
from otko.commands import AddNodesCommand
|
||||
from otko.core import ElasticBeamColumn, ElasticSection, Node
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
from otko.views.canvas3d import SelectionState
|
||||
from otko.views.tools.draw_frame import DrawFrameTool
|
||||
|
||||
|
||||
class _CanvasStub:
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import GridSystem, Node, Project # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.views.canvas3d.selection import SelectionState # noqa: E402
|
||||
from otko.views.tools.draw_node import ( # noqa: E402
|
||||
from otko.core import GridSystem, Node
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
from otko.views.canvas3d.selection import SelectionState
|
||||
from otko.views.tools.draw_node import (
|
||||
DrawNodeTool,
|
||||
_snap_to_grid,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,18 +6,17 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
CoordinateGridSystem,
|
||||
CoordinateSystem,
|
||||
ElasticUniaxial,
|
||||
GridSystem,
|
||||
Node,
|
||||
TrussElement,
|
||||
make_grid_lines,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.views.canvas3d.selection import SelectionState # noqa: E402
|
||||
from otko.views.tools.draw_truss import DrawTrussTool # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
from otko.views.canvas3d.selection import SelectionState
|
||||
from otko.views.tools.draw_truss import DrawTrussTool
|
||||
|
||||
|
||||
class _CanvasStub:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
CoordinateGridSystem,
|
||||
CoordinateSystem,
|
||||
GridLine,
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import Concrete04 # noqa: E402
|
||||
from otko.views.dialogs.material_forms import ( # noqa: E402
|
||||
Concrete04Form,
|
||||
from otko.core import Concrete04
|
||||
from otko.views.dialogs.material_forms import (
|
||||
FORM_REGISTRY,
|
||||
Concrete04Form,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.views.dialogs.material_forms import ( # noqa: E402
|
||||
from otko.views.dialogs.material_forms import (
|
||||
Concrete01Form,
|
||||
Concrete02Form,
|
||||
Steel01Form,
|
||||
|
|
|
|||
|
|
@ -8,17 +8,16 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddLoadPatternCommand,
|
||||
AddTimeSeriesCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
Node,
|
||||
from otko.core import (
|
||||
PathTimeSeries,
|
||||
Project,
|
||||
UniformExcitationPattern,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
# ─────────────── AddTimeSeriesCommand / AddLoadPatternCommand ──────────────
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddElementsCommand,
|
||||
AddMaterialsCommand,
|
||||
AddNodesCommand,
|
||||
|
|
@ -16,7 +16,7 @@ from otko.commands import ( # noqa: E402
|
|||
UpdateMaterialCommand,
|
||||
UpdateSectionCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticBeamColumn,
|
||||
ElasticSection,
|
||||
Node,
|
||||
|
|
@ -24,7 +24,7 @@ from otko.core import ( # noqa: E402
|
|||
Steel02,
|
||||
TrussElement,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
def _vm_with_steel() -> ProjectViewModel:
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
Concrete01,
|
||||
from otko.core import (
|
||||
Concrete02,
|
||||
ElasticIsotropic,
|
||||
ElasticPP,
|
||||
ElasticSection,
|
||||
ElasticUniaxial,
|
||||
Steel01,
|
||||
Steel02,
|
||||
)
|
||||
|
|
@ -100,10 +97,14 @@ def test_elastic_section_form_round_trip(qtbot) -> None: # type: ignore[no-unty
|
|||
def test_form_for_dispatches_by_type(qtbot) -> None: # type: ignore[no-untyped-def]
|
||||
from otko.views.dialogs.material_forms import (
|
||||
Steel01Form,
|
||||
)
|
||||
from otko.views.dialogs.material_forms import (
|
||||
form_for as material_form_for,
|
||||
)
|
||||
from otko.views.dialogs.section_forms import (
|
||||
ElasticSectionForm,
|
||||
)
|
||||
from otko.views.dialogs.section_forms import (
|
||||
form_for as section_form_for,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import UnitSystem # noqa: E402
|
||||
from otko.services.results import PushoverResults # noqa: E402
|
||||
from otko.views.docks.pushover_curve import ( # noqa: E402
|
||||
from otko.core import UnitSystem
|
||||
from otko.services.results import PushoverResults
|
||||
from otko.views.docks.pushover_curve import (
|
||||
PushoverCurveView,
|
||||
_is_rotation_dof,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from PySide6.QtCore import QObject, Signal # noqa: E402
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
|
||||
from otko.core import LinearTimeSeries, PlainLoadPattern, Project, TransientCase # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.views.dialogs.run_analysis import RunAnalysisDialog # noqa: E402
|
||||
from otko.core import LinearTimeSeries, PlainLoadPattern, TransientCase
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
from otko.views.dialogs.run_analysis import RunAnalysisDialog
|
||||
|
||||
|
||||
class _FakeRunner(QObject):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticBeamColumn,
|
||||
ElasticSection,
|
||||
Node,
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
AggregatorDOF,
|
||||
ElasticSection,
|
||||
FiberSection,
|
||||
RectangularPatch,
|
||||
SectionAggregator,
|
||||
)
|
||||
from otko.views.dialogs.section_forms import ( # noqa: E402
|
||||
from otko.views.dialogs.section_forms import (
|
||||
FORM_REGISTRY,
|
||||
form_for,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.views.canvas3d import SelectionState # noqa: E402
|
||||
from otko.views.canvas3d import SelectionState
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddElementsCommand,
|
||||
AddNodesCommand,
|
||||
MirrorCommand,
|
||||
MoveNodesCommand,
|
||||
ReplicateCommand,
|
||||
)
|
||||
from otko.core import Node, Steel01, TrussElement # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.core import Node, Steel01, TrussElement
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
def _populated_vm() -> ProjectViewModel:
|
||||
|
|
|
|||
|
|
@ -6,10 +6,9 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from PySide6.QtCore import Qt # noqa: E402
|
||||
from PySide6.QtWidgets import QTreeWidget # noqa: E402
|
||||
from PySide6.QtWidgets import QTreeWidget
|
||||
|
||||
from otko.core import Node # noqa: E402
|
||||
from otko.core import Node
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import UnitSystem # noqa: E402
|
||||
from otko.core import UnitSystem
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
|
|
|||
|
|
@ -6,18 +6,18 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.commands import ( # noqa: E402
|
||||
from otko.commands import (
|
||||
AddElementsCommand,
|
||||
AddMaterialsCommand,
|
||||
AddNodesCommand,
|
||||
UpdateElementFieldsCommand,
|
||||
)
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
ElasticUniaxial,
|
||||
Node,
|
||||
TrussElement,
|
||||
)
|
||||
from otko.viewmodels import ProjectViewModel # noqa: E402
|
||||
from otko.viewmodels import ProjectViewModel
|
||||
|
||||
|
||||
def _vm_with_truss() -> ProjectViewModel:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import pytest
|
|||
|
||||
pytest.importorskip("PySide6")
|
||||
|
||||
from otko.core import ( # noqa: E402
|
||||
from otko.core import (
|
||||
CoordinateGridSystem,
|
||||
GridSystem,
|
||||
Project,
|
||||
|
|
|
|||
Loading…
Reference in a new issue