Refactor carriers selection logic for clarity and readability.

Previously, the code used the variable name `apis` to represent the available tracking APIs. This has been changed to `providers` for improved semantic understanding. The condition for selecting carriers has also been updated to use the new variable name, enhancing code comprehension.
This commit is contained in:
Kumi 2023-09-12 07:47:06 +02:00
parent 81dbed9ca2
commit 4cddd70254
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -112,11 +112,11 @@ def main():
carriers = set(
[
(api[0], (api[3] if len(api) > 3 else None))
for api in tracker.apis
for provider in tracker.providers
if not any(
[
others[1] > api[1]
for others in filter(lambda x: x[0] == api[0], tracker.apis)
others[1] > provider[1]
for others in filter(lambda x: x[0] == api[0], tracker.providers)
]
)
]