Skip to content

Commit 0422335

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

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

ARCHITECTURE_2_flight_controller_communication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ ArduPilot-based flight controllers using the MAVLink protocol.
115115
### MAVLink Authentication
116116
This module implements secure key management and message authentication for MAVLink communication between the Ground Control Software and Flight Controller.
117117

118-
- **Location:**
119-
- `ardupilot_methodic_configurator/backend_signing_keystore.py`
118+
- **Location:**
119+
- `ardupilot_methodic_configurator/backend_signing_keystore.py`
120120
- `ardupilot_methodic_configurator/flightcontroller/signing.py`
121-
121+
122122
- **Responsibilities:**
123123
- Generate and securely store cryptographic signing keys.
124124
- Provide message signing and replay protection using HMAC-SHA-256.

ardupilot_methodic_configurator/backend_flightcontroller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def _send_setup_signing_command(self, key: bytes, config: SigningConfig) -> tupl
532532
logging_info(_("MAVLink signing configured on flight controller"))
533533
else:
534534
logging_warning(
535-
_("Failed to send SETUP_SIGNING command: %(error)s. " "Signing may still work if FC is pre-configured."),
535+
_("Failed to send SETUP_SIGNING command: %(error)s. Signing may still work if FC is pre-configured."),
536536
{"error": error},
537537
)
538538
# Don't fail completely - signing might still work if FC already has the key

ardupilot_methodic_configurator/backend_signing_keystore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def _bytes_to_fernet_key(key_bytes: bytes) -> bytes:
448448
# Example usage and testing
449449
if __name__ == "__main__":
450450
import sys
451-
from logging import basicConfig, DEBUG
451+
from logging import DEBUG, basicConfig
452452

453453
basicConfig(level=DEBUG)
454454

@@ -469,9 +469,9 @@ def _bytes_to_fernet_key(key_bytes: bytes) -> bytes:
469469
# Retrieve the key
470470
retrieved_key = keystore.retrieve_key(vehicle_id)
471471
if retrieved_key == key:
472-
print(f"✓ Retrieved key matches original")
472+
print("✓ Retrieved key matches original")
473473
else:
474-
print(f"✗ Retrieved key does not match")
474+
print("✗ Retrieved key does not match")
475475
sys.exit(1)
476476

477477
# List vehicles

ardupilot_methodic_configurator/data_model_signing_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010

1111
from dataclasses import dataclass, field
12-
from typing import Optional
1312

1413
from ardupilot_methodic_configurator import _
1514

docs/mavlink_signing/MAVLINK_SIGNING_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ python -m pytest tests/test_signing_config.py -v
213213
- ✅ Deserialization (load from JSON)
214214
- ✅ Edge cases (empty vehicle_id, negative timeouts, etc.)
215215

216-
---
216+
---

0 commit comments

Comments
 (0)