From 026e5b2ba9dbde7d4beefb0d61ad013dfe7f74f2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 24 Dec 2023 04:07:26 +0000 Subject: [PATCH] refactor: replace multiple `==` checks with `in` To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained `in` it instead of checking for equality against each of the values. This is faster, less verbose, and more readable. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 2f4c7db..4a43dce 100644 --- a/main.py +++ b/main.py @@ -69,7 +69,7 @@ def get_platform_info(): elif platform_ == 'Linux': if platform.machine == 'x86_64': aria2c_path = bundle_dir + '/bin/aria2c_linux_amd64' - if platform.machine == 'armv8' or platform.machine == 'armv8l': + if platform.machine in ('armv8', 'armv8l'): aria2c_path = bundle_dir + '/bin/aria2c_linux_arm64' elif platform_ == 'Darwin': aria2c_path = bundle_dir + '/bin/aria2c_macos'