Fix upstream merge conflicts

This commit is contained in:
Jason Wen
2024-02-27 21:28:12 -05:00
parent f588a0367b
commit dbaba022a2
4 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ def config_realtime_process(cores: int | list[int], priority: int) -> None:
set_core_affinity(c)
def set_thread_affinity(thread: threading.Thread, cores: List[int]) -> None:
def set_thread_affinity(thread: threading.Thread, cores: list[int]) -> None:
try:
process = psutil.Process(thread.ident)
process.cpu_affinity(cores)
+2 -2
View File
@@ -155,7 +155,7 @@ class FluxModel:
self.friction_override = (y < 0.1)
def get_nn_model_path(_car, eps_firmware) -> Tuple[Optional[str], float]:
def get_nn_model_path(_car, eps_firmware) -> tuple[str | None, float]:
def check_nn_path(_check_model):
_model_path = None
_max_similarity = -1.0
@@ -182,7 +182,7 @@ def get_nn_model_path(_car, eps_firmware) -> Tuple[Optional[str], float]:
return model_path, max_similarity
def get_nn_model(_car, eps_firmware) -> Tuple[Optional[FluxModel], float]:
def get_nn_model(_car, eps_firmware) -> tuple[FluxModel | None, float]:
model, similarity_score = get_nn_model_path(_car, eps_firmware)
if model is not None:
model = FluxModel(model)
+1 -2
View File
@@ -1,5 +1,4 @@
from cereal import car
from typing import Tuple
from openpilot.common.numpy_fast import clip, interp
from openpilot.common.params import Params
from opendbc.can.packer import CANPacker
@@ -179,7 +178,7 @@ class CarController:
return new_actuators, can_sends
# Stop and Go auto-resume thanks to martinl from subaru-community
def stop_and_go(self, CC: car.CarControl, CS: car.CarState, throttle_cmd: bool = False, speed_cmd: bool = False) -> Tuple[bool, bool]:
def stop_and_go(self, CC: car.CarControl, CS: car.CarState, throttle_cmd: bool = False, speed_cmd: bool = False) -> tuple[bool, bool]:
if not self.subaru_sng:
return throttle_cmd, speed_cmd
if self.CP.carFingerprint in PREGLOBAL_CARS:
+1 -2
View File
@@ -2,7 +2,6 @@
import sentry_sdk
import subprocess
from enum import Enum
from typing import Tuple
from sentry_sdk.integrations.threading import ThreadingIntegration
from openpilot.common.basedir import BASEDIR
@@ -93,7 +92,7 @@ def set_tag(key: str, value: str) -> None:
sentry_sdk.set_tag(key, value)
def get_properties() -> Tuple[str, str]:
def get_properties() -> tuple[str, str]:
params = Params()
dongle_id = params.get("DongleId", encoding='utf-8')
if dongle_id in (None, UNREGISTERED_DONGLE_ID):