org.sonar.l10n.py.rules.python.S1128.html Maven / Gradle / Ivy
This rule raises an issue when an imported name is unused.
Why is this an issue?
Importing names and not using them can be a source of confusion and lead to maintainability issues.
Such imports should be removed.
Noncompliant code example
from mymodule import foo, bar, qix # Noncompliant: bar is unused
foo()
qix()
Compliant solution
from mymodule import foo, qix
foo()
qix()
© 2015 - 2024 Weber Informatics LLC | Privacy Policy