Skip to content

Commit 03160a9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a37b7d7 commit 03160a9

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

tests/test_backend_flightcontroller_sitl.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,7 @@ def test_user_can_set_multiple_parameters_on_real_sitl(sitl_flight_controller: F
591591
"BATT_MONITOR": 3.0, # Type depends on SITL config, using common value
592592
"BATT_CAPACITY": 5000.0,
593593
}
594-
original_params: dict[str, Optional[float]] = {
595-
name: sitl_flight_controller.fetch_param(name) for name in test_params
596-
}
594+
original_params: dict[str, Optional[float]] = {name: sitl_flight_controller.fetch_param(name) for name in test_params}
597595

598596
try:
599597
for param_name, value in test_params.items():
@@ -607,9 +605,9 @@ def test_user_can_set_multiple_parameters_on_real_sitl(sitl_flight_controller: F
607605
if original_value is None:
608606
continue
609607
sitl_flight_controller.set_param(param_name, float(original_value))
610-
assert wait_for_param_value(
611-
sitl_flight_controller, param_name, float(original_value)
612-
), f"Failed to restore {param_name}"
608+
assert wait_for_param_value(sitl_flight_controller, param_name, float(original_value)), (
609+
f"Failed to restore {param_name}"
610+
)
613611

614612

615613
@pytest.mark.integration
@@ -1003,9 +1001,9 @@ def test_battery_status_retrieval_with_real_sitl(sitl_flight_controller: FlightC
10031001
monitor_changed = float(original_monitor) != desired_monitor
10041002
if monitor_changed:
10051003
sitl_flight_controller.set_param("BATT_MONITOR", desired_monitor)
1006-
assert wait_for_param_value(
1007-
sitl_flight_controller, "BATT_MONITOR", desired_monitor
1008-
), "Failed to configure battery monitor for SITL"
1004+
assert wait_for_param_value(sitl_flight_controller, "BATT_MONITOR", desired_monitor), (
1005+
"Failed to configure battery monitor for SITL"
1006+
)
10091007

10101008
try:
10111009
# Request periodic battery status first
@@ -1037,9 +1035,9 @@ def test_battery_status_retrieval_with_real_sitl(sitl_flight_controller: FlightC
10371035
finally:
10381036
if monitor_changed:
10391037
sitl_flight_controller.set_param("BATT_MONITOR", float(original_monitor))
1040-
assert wait_for_param_value(
1041-
sitl_flight_controller, "BATT_MONITOR", float(original_monitor)
1042-
), "Failed to restore original BATT_MONITOR value"
1038+
assert wait_for_param_value(sitl_flight_controller, "BATT_MONITOR", float(original_monitor)), (
1039+
"Failed to restore original BATT_MONITOR value"
1040+
)
10431041

10441042

10451043
@pytest.mark.integration

0 commit comments

Comments
 (0)