mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
PY-37720 Impl python ml completion features
GitOrigin-RevId: 3b8029ab460672b286d7b1cf96fd35bf9c57bf59
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d649f86a9b
commit
92e41799f2
@@ -0,0 +1 @@
|
||||
a = E<caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
class MyClazz:
|
||||
pass
|
||||
|
||||
a = M<caret>
|
||||
@@ -0,0 +1 @@
|
||||
ma<caret>
|
||||
@@ -0,0 +1,5 @@
|
||||
def my_not_builtins_function(x, y):
|
||||
print(x)
|
||||
print(y)
|
||||
|
||||
m<caret>
|
||||
@@ -0,0 +1,6 @@
|
||||
a = input()
|
||||
b = input()
|
||||
something = a > b
|
||||
if something:
|
||||
print(a)
|
||||
<caret>
|
||||
@@ -0,0 +1,8 @@
|
||||
a = input()
|
||||
b = input()
|
||||
something = a > b
|
||||
if something:
|
||||
print(a)
|
||||
else:
|
||||
print(b)
|
||||
<caret>
|
||||
@@ -0,0 +1,7 @@
|
||||
a = input()
|
||||
b = input()
|
||||
something = a > b
|
||||
if something:
|
||||
print(a)
|
||||
c = input()
|
||||
<caret>
|
||||
@@ -0,0 +1,8 @@
|
||||
a = input()
|
||||
b = input()
|
||||
something = a > b
|
||||
if something:
|
||||
print(a)
|
||||
elif something:
|
||||
print(b)
|
||||
e<caret>
|
||||
@@ -0,0 +1,6 @@
|
||||
if True:
|
||||
if True:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
<caret>
|
||||
@@ -0,0 +1 @@
|
||||
print(<caret>)
|
||||
@@ -0,0 +1,3 @@
|
||||
some_variable1 = 1
|
||||
some_variable2 = 2
|
||||
print(some_variable1, some_<caret>)
|
||||
@@ -0,0 +1,3 @@
|
||||
some_variable1 = 1
|
||||
some_variable2 = 2
|
||||
print(some_variable1, end=<caret>)
|
||||
@@ -0,0 +1,7 @@
|
||||
some_variable1 = 1
|
||||
some_variable2 = 2
|
||||
|
||||
def foo(some_param):
|
||||
print(some_param)
|
||||
|
||||
print(some_variable1, foo(<caret>))
|
||||
@@ -0,0 +1 @@
|
||||
if <caret>
|
||||
@@ -0,0 +1,5 @@
|
||||
var1 = bool(input())
|
||||
var2 = bool(input())
|
||||
if var1:
|
||||
print(var2)
|
||||
elif v<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
var1 = bool(input())
|
||||
if var1:
|
||||
<caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
def foo(x):
|
||||
return x == 3
|
||||
|
||||
if foo(<caret>)
|
||||
@@ -0,0 +1,3 @@
|
||||
var1 = bool(input())
|
||||
if var1:
|
||||
p<caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
arr1 = [1, 2, 3]
|
||||
arr2 = [4, 5, 6]
|
||||
b = 3
|
||||
while b in <caret>:
|
||||
1
python/testData/codeInsight/mlcompletion/isInFor1.py
Normal file
1
python/testData/codeInsight/mlcompletion/isInFor1.py
Normal file
@@ -0,0 +1 @@
|
||||
for <caret>
|
||||
2
python/testData/codeInsight/mlcompletion/isInFor2.py
Normal file
2
python/testData/codeInsight/mlcompletion/isInFor2.py
Normal file
@@ -0,0 +1,2 @@
|
||||
my_list = [1, 2, 3]
|
||||
for e<caret> in my_list:
|
||||
2
python/testData/codeInsight/mlcompletion/isInFor3.py
Normal file
2
python/testData/codeInsight/mlcompletion/isInFor3.py
Normal file
@@ -0,0 +1,2 @@
|
||||
my_list = [1, 2, 3]
|
||||
for e in <caret>:
|
||||
2
python/testData/codeInsight/mlcompletion/isInFor4.py
Normal file
2
python/testData/codeInsight/mlcompletion/isInFor4.py
Normal file
@@ -0,0 +1,2 @@
|
||||
my_list = [1, 2, 3]
|
||||
for e in m<caret>:
|
||||
3
python/testData/codeInsight/mlcompletion/isInFor5.py
Normal file
3
python/testData/codeInsight/mlcompletion/isInFor5.py
Normal file
@@ -0,0 +1,3 @@
|
||||
my_list = [1, 2, 3]
|
||||
for e in my_list:
|
||||
<caret>
|
||||
@@ -0,0 +1,2 @@
|
||||
local_variable = 42
|
||||
print(lo<caret>)
|
||||
@@ -0,0 +1,6 @@
|
||||
def foo(f):
|
||||
for line in f:
|
||||
print(line)
|
||||
|
||||
with open("file", "r") as as_target:
|
||||
foo(<caret>)
|
||||
1
python/testData/codeInsight/mlcompletion/kindKeyword.py
Normal file
1
python/testData/codeInsight/mlcompletion/kindKeyword.py
Normal file
@@ -0,0 +1 @@
|
||||
i<caret>
|
||||
1
python/testData/codeInsight/mlcompletion/kindNamedArg.py
Normal file
1
python/testData/codeInsight/mlcompletion/kindNamedArg.py
Normal file
@@ -0,0 +1 @@
|
||||
print("test", se<caret>)
|
||||
@@ -0,0 +1 @@
|
||||
import s<caret>
|
||||
@@ -0,0 +1,8 @@
|
||||
class MyClazz:
|
||||
pass
|
||||
|
||||
a = MyClazz()
|
||||
|
||||
def foo(x):
|
||||
b = MyClazz()
|
||||
c = M<caret>
|
||||
@@ -0,0 +1,2 @@
|
||||
a = min(1, 2)
|
||||
b = m<caret>
|
||||
@@ -0,0 +1 @@
|
||||
print("a", end=".", en<caret>)
|
||||
@@ -0,0 +1 @@
|
||||
print("a", end=".", <caret>)
|
||||
@@ -0,0 +1,2 @@
|
||||
import collections
|
||||
import o<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
arr1 = [1, 2, 3]
|
||||
arr2 = [4, 5, 6]
|
||||
if a in <caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
arr1 = [1, 2, 3]
|
||||
arr2 = [4, 5, 6]
|
||||
if a not in ar<caret>
|
||||
@@ -0,0 +1,6 @@
|
||||
a, b = 2, 3
|
||||
if a > b:
|
||||
print(a)
|
||||
elif a * 2 > b:
|
||||
print(b)
|
||||
<caret>
|
||||
@@ -0,0 +1,7 @@
|
||||
a, b = 2, 3
|
||||
if a > b:
|
||||
print(a)
|
||||
z = 42
|
||||
if a * 2 > b:
|
||||
print(b)
|
||||
<caret>
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
def aaa():
|
||||
pass
|
||||
|
||||
|
||||
def bbb():
|
||||
pass
|
||||
|
||||
<caret>
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
class Clz:
|
||||
def aaa(self):
|
||||
for i in range(0, 10):
|
||||
pass
|
||||
|
||||
|
||||
def bbb(self):
|
||||
for i in range(0, 10):
|
||||
pass
|
||||
|
||||
<caret>
|
||||
@@ -0,0 +1,13 @@
|
||||
a, b = 2, 3
|
||||
if a > b:
|
||||
|
||||
print(a)
|
||||
|
||||
for i in range(0, 10)
|
||||
pass
|
||||
|
||||
|
||||
if a * 2 > b:
|
||||
print(b)
|
||||
|
||||
<caret>
|
||||
@@ -0,0 +1,14 @@
|
||||
a, b = 2, 3
|
||||
if a > b:
|
||||
|
||||
print(a)
|
||||
|
||||
for i in range(0, 10)
|
||||
pass
|
||||
|
||||
z = 42
|
||||
|
||||
if a * 2 > b:
|
||||
print(b)
|
||||
|
||||
<caret>
|
||||
@@ -0,0 +1 @@
|
||||
if a in <caret>
|
||||
@@ -0,0 +1,2 @@
|
||||
if not in lambda
|
||||
if a in <caret>
|
||||
Reference in New Issue
Block a user