ty: fix unused warnings

This commit is contained in:
Adeeb Shihadeh
2026-02-21 10:17:51 -08:00
parent a694d051b3
commit 06298b28f1
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ class BinaryStruct:
if not is_dataclass(cls):
dataclass(init=False)(cls)
fields = list(getattr(cls, '__annotations__', {}).items())
cls.__binary_fields__ = fields # type: ignore[attr-defined]
cls.__binary_fields__ = fields
@classmethod
def _read(inner_cls, reader: BinaryReader):
@@ -184,7 +184,7 @@ class BinaryStruct:
setattr(obj, name, value)
return obj
cls._read = _read # type: ignore[attr-defined]
cls._read = _read
@classmethod
def from_bytes(cls: type[T], data: bytes) -> T:
+3 -3
View File
@@ -85,7 +85,7 @@ def _parse_and_chunk_segment(args: tuple) -> list[dict]:
if not messages:
return []
dt_ns, chunks, current, next_time = 1e9 / fps, [], {}, messages[0].logMonoTime + 1e9 / fps # type: ignore[var-annotated]
dt_ns, chunks, current, next_time = 1e9 / fps, [], {}, messages[0].logMonoTime + 1e9 / fps
for msg in messages:
if msg.logMonoTime >= next_time:
chunks.append(current)
@@ -159,7 +159,7 @@ def iter_segment_frames(camera_paths, start_time, end_time, fps=20, use_qcam=Fal
seg_frames = FrameReader(path, pix_fmt="nv12")
assert seg_frames is not None
frame = seg_frames[local_idx] if use_qcam else seg_frames.get(local_idx) # type: ignore[index, union-attr]
frame = seg_frames[local_idx] if use_qcam else seg_frames.get(local_idx)
yield global_idx, frame
@@ -286,7 +286,7 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
if big:
from openpilot.selfdrive.ui.onroad.augmented_road_view import AugmentedRoadView
else:
from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import AugmentedRoadView # type: ignore[assignment]
from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import AugmentedRoadView
from openpilot.selfdrive.ui.ui_state import ui_state
from openpilot.system.ui.lib.application import gui_app, FontWeight
timer.lap("import")