Closed deepsource-autofix[bot] closed 1 year ago
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.
in
Kudos, SonarCloud Quality Gate passed!
0 Bugs 0 Vulnerabilities 0 Security Hotspots 0 Code Smells
No Coverage information 0.0% Duplication
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.