From 2c566e78d97cf63648f1a85c18b7095471e5f616 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 b92218b..6fde4d8 100644 --- a/main.py +++ b/main.py @@ -67,7 +67,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'