mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
Ruff: comprehensions conventions (#29317)
ignore c408 old-commit-hash: 4a9afd7554060ac5353e96f1d7feb06d3a3671e9
This commit is contained in:
@@ -130,7 +130,7 @@ class TestLoggerd(unittest.TestCase):
|
||||
|
||||
# check params
|
||||
logged_params = {entry.key: entry.value for entry in initData.params.entries}
|
||||
expected_params = set(k for k, _, __ in fake_params) | {'LaikadEphemerisV3'}
|
||||
expected_params = {k for k, _, __ in fake_params} | {'LaikadEphemerisV3'}
|
||||
assert set(logged_params.keys()) == expected_params, set(logged_params.keys()) ^ expected_params
|
||||
assert logged_params['LaikadEphemerisV3'] == b'', f"DONT_LOG param value was logged: {repr(logged_params['LaikadEphemerisV3'])}"
|
||||
for param_key, initData_key, v in fake_params:
|
||||
|
||||
@@ -46,7 +46,7 @@ class FakeResponse:
|
||||
UploadResponse = Union[requests.Response, FakeResponse]
|
||||
|
||||
def get_directory_sort(d: str) -> List[str]:
|
||||
return list(map(lambda s: s.rjust(10, '0'), d.rsplit('--', 1)))
|
||||
return [s.rjust(10, '0') for s in d.rsplit('--', 1)]
|
||||
|
||||
def listdir_by_creation(d: str) -> List[str]:
|
||||
try:
|
||||
|
||||
@@ -19,8 +19,8 @@ if __name__ == "__main__":
|
||||
recv_time = report.milliseconds / 1000
|
||||
|
||||
car = []
|
||||
print("qcom has ", list(sorted([x.svId for x in report.sv])))
|
||||
print("ublox has", list(sorted([x.svId for x in meas if x.gnssId == (6 if GLONASS else 0)])))
|
||||
print("qcom has ", sorted([x.svId for x in report.sv]))
|
||||
print("ublox has", sorted([x.svId for x in meas if x.gnssId == (6 if GLONASS else 0)]))
|
||||
for i in report.sv:
|
||||
# match to ublox
|
||||
tm = None
|
||||
|
||||
Reference in New Issue
Block a user