mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
PY-58464 Restore stdlib canonical path for Decimal
GitOrigin-RevId: 1c0df1d9c9e8ad22b464e54c4bc30dda4f903946
This commit is contained in:
committed by
intellij-monorepo-bot
parent
85aea1e221
commit
f38d61eed6
@@ -54,6 +54,7 @@ fun restoreStdlibCanonicalPath(qName: QualifiedName): QualifiedName? {
|
||||
"ntpath", "posixpath", "path", "macpath", "os2emxpath", "genericpath" -> qName.replaceHead("os.path")
|
||||
"_sqlite3" -> qName.replaceHead("sqlite3")
|
||||
"_pickle" -> qName.replaceHead("pickle")
|
||||
"_decimal" -> qName.replaceHead("decimal")
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<error descr="Unresolved reference 'Decimal'">Dec<caret>imal</error>
|
||||
@@ -0,0 +1,3 @@
|
||||
from decimal import Decimal
|
||||
|
||||
Decimal
|
||||
@@ -464,6 +464,11 @@ public class PyAddImportQuickFixTest extends PyQuickFixTestCase {
|
||||
);
|
||||
}
|
||||
|
||||
// PY-58464
|
||||
public void testDecimalCanonicalPath() {
|
||||
doMultiFileAutoImportTest("Import 'decimal.Decimal'");
|
||||
}
|
||||
|
||||
private void doTestProposedImportsOrdering(String @NotNull ... expected) {
|
||||
doMultiFileAutoImportTest("Import", fix -> {
|
||||
final List<String> candidates = ContainerUtil.map(fix.getCandidates(), c -> c.getPresentableText());
|
||||
|
||||
Reference in New Issue
Block a user