mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 06:20:54 +07:00
PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
Update CompatibilityVisitor to highlight "async" inside comprehensions and generator expressions in Pythons < 3.6
This commit is contained in:
@@ -310,6 +310,16 @@ public class PythonHighlightingTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-20770
|
||||
public void testAsyncComprehensionsPy35() {
|
||||
doTest(LanguageLevel.PYTHON35, true, false);
|
||||
}
|
||||
|
||||
// PY-20770
|
||||
public void testAsyncComprehensionsPy36() {
|
||||
doTest(LanguageLevel.PYTHON36, true, false);
|
||||
}
|
||||
|
||||
// PY-20775
|
||||
public void testFStringMissingRightBrace() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36, () -> doTest(true, false));
|
||||
@@ -329,12 +339,12 @@ public class PythonHighlightingTest extends PyTestCase {
|
||||
public void testFStringHashSigns() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36, () -> doTest(true, false));
|
||||
}
|
||||
|
||||
|
||||
// PY-20844
|
||||
public void testFStringBackslashes() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36, () -> doTest(true, false));
|
||||
}
|
||||
|
||||
|
||||
// ---
|
||||
private void doTest(final LanguageLevel languageLevel, final boolean checkWarnings, final boolean checkInfos) {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), languageLevel);
|
||||
|
||||
Reference in New Issue
Block a user