disable incorrectly working and unneeded highlighting (PY-1424)

This commit is contained in:
Dmitry Jemerov
2010-09-14 19:20:20 +04:00
parent 39d18225f4
commit db1661bf46
3 changed files with 8 additions and 5 deletions

View File

@@ -4,8 +4,6 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiWhiteSpace;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.containers.HashSet;
import com.jetbrains.python.PyBundle;
import com.jetbrains.python.PyNames;
import com.jetbrains.python.codeInsight.intentions.*;
import com.jetbrains.python.psi.*;
@@ -13,12 +11,12 @@ import com.jetbrains.python.psi.impl.PyQualifiedName;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Set;
/**
* @author Alexey.Ivanov
*/
public class UnsupportedFeatures extends PyAnnotator {
/*
private static final Set<String> REMOVED_METHODS = new HashSet<String>();
static {
@@ -30,6 +28,7 @@ public class UnsupportedFeatures extends PyAnnotator {
REMOVED_METHODS.add("reduce");
REMOVED_METHODS.add("reload");
}
*/
@NotNull
private static LanguageLevel getLanguageLevel(PyElement node) {
@@ -142,7 +141,9 @@ public class UnsupportedFeatures extends PyAnnotator {
}
}
}
} else {
}
/* incorrectly working functionality temporarily removed (PY-1424, PY-1820)
else {
final String name = node.getCallee().getName();
if ("raw_input".equals(name)) {
getHolder().createWarningAnnotation(node.getCallee(), PyBundle.message("ANN.method.$0.removed.use.$1", name, "input")).
@@ -152,6 +153,7 @@ public class UnsupportedFeatures extends PyAnnotator {
getHolder().createWarningAnnotation(node.getCallee(), PyBundle.message("ANN.method.$0.removed", name));
}
}
*/
}
@Override

View File

@@ -1,6 +1,5 @@
print(<warning descr="<> is not supported in Python 3, use != instead">a <> 3</warning>)
<warning descr="Backquote is not supported in Python 3, use repr() instead">`foo()`</warning>
x = <warning descr="Method 'raw_input' has been removed, use 'input' instead">raw_input</warning>()
a = <warning descr="Integer literals do not support a trailing 'l' or 'L' in Python 3">123l</warning>
a = <warning descr="Python 3 requires '0o' prefix for octal literals">043</warning>
a = 0X43

View File

@@ -75,9 +75,11 @@ public class PyIntentionTest extends PyLightFixtureTestCase {
doTest(PyBundle.message("INTN.replace.backquote.expression"), LanguageLevel.PYTHON30);
}
/*
public void testReplaceMethod() {
doTest(PyBundle.message("INTN.replace.method"), LanguageLevel.PYTHON30);
}
*/
public void testSplitIf() {
doTest(PyBundle.message("INTN.split.if.text"));