mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't suppress other completion contributors in dict keys (PY-2558)
This commit is contained in:
@@ -70,13 +70,6 @@ public class PyDictKeyNamesCompletionContributor extends PySeeingOriginalComplet
|
||||
}
|
||||
}
|
||||
}
|
||||
// filter unusable lookup elements
|
||||
dictCompletion.runRemainingContributors(parameters, new Consumer<LookupElement>() {
|
||||
public void consume(final LookupElement lookupElement) {
|
||||
if (lookupElement.getLookupString().equals("dict key"))
|
||||
dictCompletion.addElement(lookupElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
ENCODINGS = {}
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
if self.id[0] == 'T':
|
||||
encoding = ord(self.rawData[0])
|
||||
if 0 <= encoding < len(ENCODINGS):
|
||||
value = self.rawData[1:].decode(ENCODINGS[encoding])
|
||||
@@ -0,0 +1,8 @@
|
||||
ENCODINGS = {}
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
if self.id[0] == 'T':
|
||||
encoding = ord(self.rawData[0])
|
||||
if 0 <= encoding < len(ENCODINGS):
|
||||
value = self.rawData[1:].decode(ENCODINGS[enc<caret>])
|
||||
@@ -247,4 +247,8 @@ public class PythonCompletionTest extends PyLightFixtureTestCase {
|
||||
public void testElseInCondExpr() { // PY-2397
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testLocalVarInDictKey() { // PY-2558
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user