added ruff test
This commit is contained in:
@@ -13,7 +13,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkAcquisitionWorker
|
||||
from orisys_app_shared.record import ExperimentRecorder, RecordConfig
|
||||
from orisys_app_shared.record.calibration_snapshot import (
|
||||
|
||||
@@ -12,7 +12,6 @@ import shutil
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.force.calibration_io import (
|
||||
CalSample,
|
||||
CalSessionStore,
|
||||
|
||||
@@ -12,7 +12,6 @@ import shutil
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.force.calibration_recorder import CalibrationRecorder
|
||||
from orisys_app_shared.force.calibration_session import (
|
||||
SAMPLE_FIELDS,
|
||||
|
||||
@@ -15,7 +15,6 @@ import math
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.force import select_display_forces
|
||||
from orisys_app_shared.force.session import SessionSample, SessionStore
|
||||
|
||||
@@ -15,7 +15,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.record import (
|
||||
EVENTS_HEADER,
|
||||
|
||||
@@ -15,7 +15,6 @@ from __future__ import annotations
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.force.filters import (
|
||||
CHANNELS,
|
||||
FilterSettings,
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.force.history import MetricHistory
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import numpy as np
|
||||
|
||||
from orisys_app_shared.force.presentation import ForcePresentation, ZeroEstimate
|
||||
|
||||
#: The idle triplet from the customer's screenshot at run start: the numbers the
|
||||
|
||||
@@ -14,7 +14,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.force.session import SessionSample, SessionStore
|
||||
from orisys_app_shared.force.source import RecordingCurveSource, StoreCurveSource
|
||||
|
||||
@@ -10,7 +10,6 @@ from __future__ import annotations
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition import image_backend as backend
|
||||
from orisys_app_shared.acquisition.arrows import (
|
||||
depth_map_to_bgr,
|
||||
|
||||
@@ -79,7 +79,8 @@ def test_the_session_format_does_not_import_the_sampling_state_machine():
|
||||
|
||||
def test_the_moved_models_are_the_same_objects_everywhere():
|
||||
from orisys_app_shared.acquisition import finger_worker, models, sdk_worker
|
||||
from orisys_app_shared.force import calibration_recorder, calibration_session, models as force_models
|
||||
from orisys_app_shared.force import calibration_recorder, calibration_session
|
||||
from orisys_app_shared.force import models as force_models
|
||||
|
||||
assert sdk_worker.SdkPacket is models.SdkPacket is finger_worker.SdkPacket
|
||||
assert sdk_worker.FixedCameraMode is models.FixedCameraMode
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import numpy as np
|
||||
|
||||
from orisys_app_shared.scene3d.overlays import (
|
||||
arrow_instances_to_mesh,
|
||||
build_flow_overlay,
|
||||
|
||||
@@ -7,16 +7,12 @@ that the policy's risks are reported instead of discovered later.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import csv
|
||||
import json
|
||||
import shutil
|
||||
import sys
|
||||
import types
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.record import (
|
||||
ExperimentRecorder,
|
||||
|
||||
@@ -18,13 +18,12 @@ import time
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.force.calibration_recorder import (
|
||||
STATUS_FEW_SAMPLES,
|
||||
STATUS_OK,
|
||||
CalibrationRecorder,
|
||||
)
|
||||
from orisys_app_shared.force.session import NA, SessionSample, SessionStore
|
||||
from orisys_app_shared.force.session import SessionSample, SessionStore
|
||||
|
||||
|
||||
def _sample(index: int, *, valid: bool = True, rate: float = 30.0) -> SessionSample:
|
||||
|
||||
@@ -18,7 +18,6 @@ from unittest.mock import patch
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.record import ExperimentRecorder, RecordConfig
|
||||
from orisys_app_shared.record.experiment import (
|
||||
|
||||
@@ -14,7 +14,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.sdk_worker import SdkPacket
|
||||
from orisys_app_shared.record import ExperimentRecorder, RecordConfig
|
||||
from orisys_app_shared.record.sample import STALE_REASON, to_record_sample
|
||||
|
||||
@@ -16,16 +16,14 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.scene3d import synthetic
|
||||
from orisys_app_shared.scene3d.contracts import (
|
||||
ExpectedGeometry,
|
||||
Material,
|
||||
MeshPart,
|
||||
SceneAssets,
|
||||
ThreeDError,
|
||||
validate_assets,
|
||||
freeze,
|
||||
validate_assets,
|
||||
)
|
||||
from orisys_app_shared.scene3d.digest import (
|
||||
asset_hash,
|
||||
@@ -414,7 +412,6 @@ def test_normals_disagree_with_faces_detects_the_defect():
|
||||
def test_the_shipped_housing_has_no_stale_shading():
|
||||
"""The real housing: 134 of 2172 edges are creases, so plain averaging bands."""
|
||||
import io
|
||||
import zipfile
|
||||
|
||||
package = (
|
||||
Path(__file__).resolve().parents[2]
|
||||
|
||||
@@ -15,7 +15,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.scene3d import contracts as c
|
||||
|
||||
|
||||
@@ -477,7 +476,6 @@ def test_the_contract_layer_imports_without_qt_or_opengl():
|
||||
could be pulled in — the earlier spelling named PyQt5, before the migration.
|
||||
"""
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
script = (
|
||||
"import sys;"
|
||||
|
||||
@@ -22,7 +22,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.acquisition.geometry import (
|
||||
describe_sensor_geometry,
|
||||
map_path_for,
|
||||
|
||||
@@ -9,26 +9,17 @@ grow.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import threading
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.scene3d import synthetic
|
||||
from orisys_app_shared.scene3d.composer import DISPLAY_ILLUSTRATIVE, SceneComposer
|
||||
from orisys_app_shared.scene3d.contracts import (
|
||||
ColorScale,
|
||||
DisplaySettings,
|
||||
FieldDescriptor,
|
||||
FrameIdentity,
|
||||
Quality,
|
||||
RenderFrame,
|
||||
SurfaceFieldFrame,
|
||||
ThreeDError,
|
||||
freeze,
|
||||
rest_descriptor,
|
||||
)
|
||||
from orisys_app_shared.scene3d.sampling import (
|
||||
remap_to_domain,
|
||||
|
||||
@@ -16,19 +16,18 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.scene3d import synthetic
|
||||
from orisys_app_shared.scene3d.contracts import ExpectedGeometry, ThreeDError
|
||||
from orisys_app_shared.scene3d.digest import asset_hash, content_digest
|
||||
from orisys_app_shared.scene3d.glb import with_housing
|
||||
from orisys_app_shared.scene3d.package import (
|
||||
MAGIC,
|
||||
PackagedAssetLoader,
|
||||
describe_package,
|
||||
read_package,
|
||||
scene_from_contents,
|
||||
write_package,
|
||||
)
|
||||
from orisys_app_shared.scene3d.package import PackagedAssetLoader
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -318,8 +317,8 @@ def test_an_encrypted_payload_needs_a_key_provider_and_a_verification_key(scene,
|
||||
"cryptography", reason="sealing needs the crypto backend"
|
||||
)
|
||||
del crypto
|
||||
from orisys_app_shared.scene3d.contracts import Sealing
|
||||
from orisys_app_shared.scene3d import protect as protect_module
|
||||
from orisys_app_shared.scene3d.contracts import Sealing
|
||||
|
||||
private = protect_module.generate_signing_key()
|
||||
public = protect_module.public_key_pem(private)
|
||||
|
||||
@@ -30,7 +30,6 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.record.visualization3d import (
|
||||
BLOCK_VERSION,
|
||||
build_block,
|
||||
|
||||
@@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from orisys_app_shared.scene3d.contracts import ThreeDError
|
||||
from orisys_app_shared.scene3d.visual_policy import (
|
||||
VisualPolicy,
|
||||
|
||||
@@ -25,7 +25,7 @@ STOP_BUDGET_S = 0.5
|
||||
class FakeSensor:
|
||||
"""Blocks in the constructor until ``release`` is set."""
|
||||
|
||||
def __init__(self, release: threading.Event, tracker: "OpenTracker", **kwargs):
|
||||
def __init__(self, release: threading.Event, tracker: OpenTracker, **kwargs):
|
||||
tracker.opened(self)
|
||||
if not release.wait(timeout=10.0):
|
||||
raise TimeoutError("fake sensor was never released")
|
||||
|
||||
Reference in New Issue
Block a user