Ruff: comprehensions conventions (#29317)

ignore c408
old-commit-hash: 4a9afd7554060ac5353e96f1d7feb06d3a3671e9
This commit is contained in:
Justin Newberry
2023-08-10 16:40:30 -07:00
committed by GitHub
parent 7d6d3dc9ea
commit a14f162bc7
16 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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