执行 Ruff 安全自动修复
This commit is contained in:
@@ -3,6 +3,7 @@ TAF/WUP 帧解码器 — 将二进制帧转为可读摘要,用于日志输出
|
||||
"""
|
||||
|
||||
from typing import Any, cast
|
||||
|
||||
from .taf_protocol import TafInputStream, TafType
|
||||
from .wup_protocol import normalize_wup_payload
|
||||
|
||||
@@ -103,7 +104,7 @@ def _decode_taf_struct(ins: TafInputStream, depth: int = 0) -> dict:
|
||||
except Exception:
|
||||
val = f"<decode_err:0x{dtype:02x}>"
|
||||
else:
|
||||
val = f"<...>"
|
||||
val = "<...>"
|
||||
try:
|
||||
ins.skip_field(dtype)
|
||||
except Exception:
|
||||
@@ -152,13 +153,7 @@ def _decode_wup_body(body: bytes) -> dict:
|
||||
if tag > 10:
|
||||
break
|
||||
ins.read_head()
|
||||
if tag == 1:
|
||||
if dtype != TafType.ZERO:
|
||||
ins._read_int_value(dtype)
|
||||
elif tag in (2, 3):
|
||||
if dtype != TafType.ZERO:
|
||||
ins._read_int_value(dtype)
|
||||
elif tag == 4:
|
||||
if tag == 1 or tag in (2, 3) or tag == 4:
|
||||
if dtype != TafType.ZERO:
|
||||
ins._read_int_value(dtype)
|
||||
elif tag == 5:
|
||||
|
||||
Reference in New Issue
Block a user