mirror of
https://github.com/smittix/intercept.git
synced 2026-07-07 17:18:11 -07:00
style: apply ruff-format to entire codebase
First-time run of ruff-format via pre-commit hook normalises quote style, trailing commas, and whitespace across 188 Python files. No logic changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+16
-15
@@ -8,23 +8,23 @@ from utils.alerts import get_alert_manager
|
||||
from utils.recording import get_recording_manager
|
||||
from utils.temporal_patterns import get_pattern_detector
|
||||
|
||||
IGNORE_TYPES = {'keepalive', 'ping'}
|
||||
IGNORE_TYPES = {"keepalive", "ping"}
|
||||
|
||||
|
||||
DEVICE_ID_FIELDS = (
|
||||
'device_id',
|
||||
'id',
|
||||
'mac',
|
||||
'mac_address',
|
||||
'address',
|
||||
'bssid',
|
||||
'station_mac',
|
||||
'client_mac',
|
||||
'icao',
|
||||
'callsign',
|
||||
'mmsi',
|
||||
'uuid',
|
||||
'hash',
|
||||
"device_id",
|
||||
"id",
|
||||
"mac",
|
||||
"mac_address",
|
||||
"address",
|
||||
"bssid",
|
||||
"station_mac",
|
||||
"client_mac",
|
||||
"icao",
|
||||
"callsign",
|
||||
"mmsi",
|
||||
"uuid",
|
||||
"hash",
|
||||
)
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ def process_event(mode: str, event: dict | Any, event_type: str | None = None) -
|
||||
# Alert failures should never break streaming
|
||||
pass
|
||||
|
||||
|
||||
def _extract_device_id(event: dict) -> str | None:
|
||||
for field in DEVICE_ID_FIELDS:
|
||||
value = event.get(field)
|
||||
@@ -63,7 +64,7 @@ def _extract_device_id(event: dict) -> str | None:
|
||||
if text:
|
||||
return text
|
||||
|
||||
nested_candidates = ('target', 'device', 'source', 'aircraft', 'vessel')
|
||||
nested_candidates = ("target", "device", "source", "aircraft", "vessel")
|
||||
for key in nested_candidates:
|
||||
nested = event.get(key)
|
||||
if isinstance(nested, dict):
|
||||
|
||||
Reference in New Issue
Block a user