mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add an option to ignore unused variables starting with '_' (PY-27435)
This commit is contained in:
@@ -87,6 +87,7 @@ public class PyUnusedLocalInspectionTest extends PyInspectionTestCase {
|
||||
}
|
||||
|
||||
// PY-3996
|
||||
// PY-27435
|
||||
public void testUnderscorePrefixed() {
|
||||
doTest();
|
||||
}
|
||||
@@ -101,6 +102,13 @@ public class PyUnusedLocalInspectionTest extends PyInspectionTestCase {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON37, this::doTest);
|
||||
}
|
||||
|
||||
// PY-27435
|
||||
public void testVariableStartingWithUnderscore() {
|
||||
final PyUnusedLocalInspection inspection = new PyUnusedLocalInspection();
|
||||
inspection.ignoreVariablesStartingWithUnderscore = false;
|
||||
doTest(inspection);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected Class<? extends PyInspection> getInspectionClass() {
|
||||
|
||||
Reference in New Issue
Block a user