mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -99,7 +99,7 @@ public class TypeAssertionIntention implements IntentionAction {
|
||||
if (document.getLineNumber(statementList.getTextOffset()) ==
|
||||
document.getLineNumber(statementListParent.getTextOffset())) {
|
||||
final String substring =
|
||||
TextRange.create(statementListParent.getTextOffset(), statementList.getTextOffset()).substring(document.getText());
|
||||
TextRange.create(statementListParent.getTextRange().getStartOffset(), statementList.getTextOffset()).substring(document.getText());
|
||||
final PyStatement foo =
|
||||
elementGenerator.createFromText(LanguageLevel.forElement(problemElement), PyStatement.class, substring + "\n\t" +
|
||||
text + "\n\t" + statementList.getText());
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
def foo(a, b):
|
||||
assert isinstance(a, object)
|
||||
a.
|
||||
@@ -0,0 +1 @@
|
||||
def foo(a, b): a<caret>.
|
||||
@@ -249,6 +249,10 @@ public class PyIntentionTest extends PyTestCase {
|
||||
doTest(PyBundle.message("INTN.insert.assertion"));
|
||||
}
|
||||
|
||||
public void testTypeAssertion1() { //PY-7089
|
||||
doTest(PyBundle.message("INTN.insert.assertion"));
|
||||
}
|
||||
|
||||
public void testDocStub() {
|
||||
doDocStubTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user