more ty, part 2 (#38379)

This commit is contained in:
Adeeb Shihadeh
2026-07-19 11:02:00 -07:00
committed by GitHub
parent 19ecc37de8
commit f0d93eb32d
57 changed files with 194 additions and 165 deletions
@@ -63,10 +63,10 @@ class UploaderTestCase:
seg_dir: str
def set_ignore(self):
uploader.Api = MockApiIgnore
uploader.Api = MockApiIgnore # ty: ignore[invalid-assignment] # test double
def setup_method(self):
uploader.Api = MockApi
uploader.Api = MockApi # ty: ignore[invalid-assignment] # test double
uploader.fake_upload = True
uploader.force_wifi = True
uploader.allow_sleep = False
@@ -19,7 +19,7 @@ class TestDeleter(UploaderTestCase):
self.f_type = "fcamera.hevc"
super().setup_method()
self.fake_stats = Stats(f_bavail=0, f_blocks=10, f_frsize=4096)
deleter.os.statvfs = self.fake_statvfs
deleter.os.statvfs = self.fake_statvfs # ty: ignore[invalid-assignment] # test double
def start_thread(self):
self.end_event = threading.Event()
@@ -5,6 +5,7 @@ import random
import string
import subprocess
import time
from collections.abc import Collection
from collections import defaultdict
from pathlib import Path
import pytest
@@ -74,8 +75,8 @@ class TestLoggerd:
end_type = SentinelType.endOfRoute if route else SentinelType.endOfSegment
assert msgs[-1].sentinel.type == end_type
def _publish_random_messages(self, services: list[str]) -> dict[str, list]:
pm = messaging.PubMaster(services)
def _publish_random_messages(self, services: Collection[str]) -> dict[str, list]:
pm = messaging.PubMaster(list(services))
managed_processes["loggerd"].start()
for s in services: