Refactor carrier selection logic in __main__.py
This commit refactors the carrier selection logic in the `main` function in `__main__.py`. The code now uses the variable name `provider` instead of `api` for clarity. Additionally, the logic for filtering providers is updated to correctly check for other providers with a higher priority for a given carrier.
This commit is contained in:
parent
4cddd70254
commit
dafce82106
1 changed files with 2 additions and 2 deletions
|
@ -111,12 +111,12 @@ def main():
|
|||
|
||||
carriers = set(
|
||||
[
|
||||
(api[0], (api[3] if len(api) > 3 else None))
|
||||
(provider[0], (provider[3] if len(provider) > 3 else None))
|
||||
for provider in tracker.providers
|
||||
if not any(
|
||||
[
|
||||
others[1] > provider[1]
|
||||
for others in filter(lambda x: x[0] == api[0], tracker.providers)
|
||||
for others in filter(lambda x: x[0] == provider[0], tracker.providers)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue