mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] Cleanup in ImportToImportFromIntention: use simpler API for replacing a PSI element
GitOrigin-RevId: 815e6d1d879d3d8ee85cccf43b73ea2797687d61
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9cfd020b2a
commit
0a7cb22aa2
+1
-2
@@ -152,8 +152,7 @@ public final class ImportToImportFromIntention extends PsiBasedModCommandAction<
|
||||
parent.addAfter(newImportStatement, importStatement); // add 'import from': we need the module imported as is
|
||||
}
|
||||
else { // replace entire existing import
|
||||
parent.getNode().replaceChild(importStatement.getNode(), newImportStatement.getNode());
|
||||
// import_statement.replace(from_import_stmt);
|
||||
importStatement.replace(newImportStatement);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user