Fix all ruff lint errors across decnet/, templates/, and tests/
Some checks failed
CI / Test (pytest) (3.11) (push) Has been cancelled
CI / Test (pytest) (3.12) (push) Has been cancelled
Security / SAST (bandit) (push) Has been cancelled
Security / Dependency audit (pip-audit) (push) Has been cancelled
CI / Lint (ruff) (push) Has been cancelled

This commit is contained in:
2026-04-04 17:36:16 -03:00
parent 4acfa3f779
commit 988732f4f9
72 changed files with 426192 additions and 123 deletions

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
from __future__ import annotations
"""
Shared RFC 5424 syslog helper for DECNET service templates.

View File

@@ -7,11 +7,8 @@ interactions as JSON.
"""
import asyncio
import json
import os
import socket
import struct
from datetime import datetime, timezone
from decnet_logging import syslog_line, write_syslog_file, forward_syslog
NODE_NAME = os.environ.get("NODE_NAME", "mqtt-broker")
@@ -48,11 +45,13 @@ def _parse_connect(payload: bytes):
# Protocol level (1 byte)
if pos >= len(payload):
return {}, pos
_proto_level = payload[pos]; pos += 1
_proto_level = payload[pos]
pos += 1
# Connect flags (1 byte)
if pos >= len(payload):
return {}, pos
flags = payload[pos]; pos += 1
flags = payload[pos]
pos += 1
# Keep alive (2 bytes)
pos += 2
# Client ID