All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.py.rules.python.InequalityUsage.html Maven / Gradle / Ivy

There is a newer version: 4.23.0.17664
Show newest version

This rule raises an issue when the inequality operator <> is used.

Why is this an issue?

The operators <> and != are equivalent. However, the <> operator is considered obsolete in Python 2.7 and has been removed from Python 3. Therefore, it is recommended to use != instead.

Code examples

Noncompliant code example

return a <> b # Noncompliant: the operator "<>" is deprecated.

Compliant solution

return a != b

Resources

Documentation





© 2015 - 2024 Weber Informatics LLC | Privacy Policy