Skip to content

Commit b8d722a

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

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

ardupilot_methodic_configurator/backend_signing_keystore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from platformdirs import user_data_dir
2323

2424
# Constants
25-
SIGNING_KEY_LENGTH = 32
25+
SIGNING_KEY_LENGTH = 32
2626
APP_NAME = "ArduPilot Methodic Configurator"
2727
KEYSTORE_FILENAME = "mavlink_signing_keys.json"
2828
KEYSTORE_VERSION = 1
@@ -74,7 +74,7 @@ def from_dict(cls, data: dict[str, object]) -> "KeystoreData":
7474
"""Create from dictionary."""
7575
keys_data: dict[str, dict[str, str]] = data.get("keys", {}) # type: ignore[assignment]
7676
keys = {k: StoredKey.from_dict(v) for k, v in keys_data.items()}
77-
return cls(version=data.get("version", KEYSTORE_VERSION), keys=keys) # type: ignore[arg-type]
77+
return cls(version=data.get("version", KEYSTORE_VERSION), keys=keys) # type: ignore[arg-type]
7878

7979

8080
class SigningKeystore:

ardupilot_methodic_configurator/data_model_signing_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,3 @@ def from_dict(cls, data: dict[str, Any]) -> "VehicleSigningConfig":
251251
signing_config=signing_config,
252252
auto_setup=data.get("auto_setup", False),
253253
)
254-

tests/bdd_signing_sitl_integration.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ def signing_keystore(tmp_path) -> SigningKeystore:
4646
class TestSITLConnectionWithSigning:
4747
"""Test MAVLink signing with actual SITL connection."""
4848

49-
def test_can_connect_to_sitl(
50-
self, sitl_flight_controller: FlightController
51-
) -> None:
49+
def test_can_connect_to_sitl(self, sitl_flight_controller: FlightController) -> None:
5250
"""
5351
User can connect to SITL successfully.
5452
@@ -60,9 +58,7 @@ def test_can_connect_to_sitl(
6058
assert sitl_flight_controller.master is not None
6159
assert sitl_flight_controller.info is not None
6260

63-
def test_can_get_signing_status(
64-
self, sitl_flight_controller: FlightController
65-
) -> None:
61+
def test_can_get_signing_status(self, sitl_flight_controller: FlightController) -> None:
6662
"""
6763
User can check signing status on a connected FlightController.
6864
@@ -163,9 +159,7 @@ def test_stored_key_can_be_used_for_signing( # pylint: disable=redefined-outer-
163159
class TestSITLSigningEdgeCases:
164160
"""Test edge cases for signing with SITL connection."""
165161

166-
def test_signing_with_invalid_key_length_raises_error(
167-
self, sitl_flight_controller: FlightController
168-
) -> None:
162+
def test_signing_with_invalid_key_length_raises_error(self, sitl_flight_controller: FlightController) -> None:
169163
"""
170164
Setting up signing with invalid key length raises an error.
171165
@@ -177,9 +171,7 @@ def test_signing_with_invalid_key_length_raises_error(
177171
with pytest.raises(ValueError, match="32 bytes"):
178172
sitl_flight_controller.setup_signing(invalid_key)
179173

180-
def test_signing_with_invalid_link_id_raises_error(
181-
self, sitl_flight_controller: FlightController
182-
) -> None:
174+
def test_signing_with_invalid_link_id_raises_error(self, sitl_flight_controller: FlightController) -> None:
183175
"""
184176
Setting up signing with invalid link_id raises an error.
185177

tests/unit_signing_keystore.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,3 @@ def test_keyring_stores_base64_encoded_key(self, tmp_path: Path) -> None:
341341
call_args = mock_keyring.set_password.call_args
342342
stored_value = call_args[0][2]
343343
assert stored_value == expected_b64
344-

0 commit comments

Comments
 (0)