Support __class_getitem__ (PY-27913)

Update resolve for `[]` on definitions so `__class_getitem__` is supported.
Support this method (and `__mro_entries__`) in highlighting and completion.
Process it as a static method.
This commit is contained in:
Semyon Proshev
2018-02-05 18:04:29 +03:00
parent 9394306103
commit 6a09e252eb
12 changed files with 122 additions and 20 deletions

View File

@@ -391,6 +391,11 @@ public class PythonHighlightingTest extends PyTestCase {
doTest(LanguageLevel.PYTHON37, false, false);
}
// PY-27913
public void testDunderClassGetItem() {
doTest(LanguageLevel.PYTHON37, false, true);
}
@NotNull
private static EditorColorsScheme createTemporaryColorScheme() {
EditorColorsManager manager = EditorColorsManager.getInstance();