[python] Cleanup in ImportToImportFromIntention: use simpler API for replacing a PSI element

GitOrigin-RevId: 815e6d1d879d3d8ee85cccf43b73ea2797687d61
This commit is contained in:
Mikhail Golubev
2024-04-02 18:57:35 +00:00
committed by intellij-monorepo-bot
parent 9cfd020b2a
commit 0a7cb22aa2
@@ -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 {