Skip to content

Commit

Permalink
refactor: replace multiple == checks with in
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
deepsource-autofix[bot] authored and itsHenry35 committed Dec 24, 2023
1 parent a96afad commit 026e5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 026e5b2

Please sign in to comment.