mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
PY-85706 Don't insert "t" prefix on completion in string arguments of unresolved functions
GitOrigin-RevId: c55b66d83f7518af43fb7dac8eb5a44560a10f85
This commit is contained in:
committed by
intellij-monorepo-bot
parent
145f162042
commit
8762972bad
+5
-1
@@ -158,7 +158,11 @@ public final class PyFStringLikeCompletionContributor extends CompletionContribu
|
||||
!(argumentList.getParent() instanceof PyCallExpression call)) {
|
||||
return false;
|
||||
}
|
||||
return ContainerUtil.all(call.multiMapArguments(PyResolveContext.defaultContext(typeEvalContext)), mapping -> {
|
||||
List<PyCallExpression.PyArgumentsMapping> mappings = call.multiMapArguments(PyResolveContext.defaultContext(typeEvalContext));
|
||||
if (mappings.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return ContainerUtil.all(mappings, mapping -> {
|
||||
PyCallableParameter param = mapping.getMappedParameters().get(callArgument);
|
||||
if (param == null) return false;
|
||||
PyType paramType = param.getType(typeEvalContext);
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
unresolved(f"foo{divmod(<caret>)}")
|
||||
+1
@@ -0,0 +1 @@
|
||||
unresolved("foo{divmo<caret>")
|
||||
@@ -567,6 +567,11 @@ public class Py3CompletionTest extends PyTestCase {
|
||||
public void testFStringLikeCompletionAddsTPrefixWhereTemplateStringIsExpectedAsAssignedValueWithUnpacking() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-85706
|
||||
public void testFStringLikeCompletionDoesNotAddTPrefixInsideUnresolvedFunctionCalls() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-46056
|
||||
public void testImportCompletionHintForSameDirectoryModuleInOrdinaryPackage() {
|
||||
|
||||
Reference in New Issue
Block a user