mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
invalid list comprehensions should not raise exceptions anymore
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# This file is less about the results and much more about the fact, that no
|
||||
# exception should be thrown.
|
||||
|
||||
#? ['upper']
|
||||
str()).upper
|
||||
|
||||
@@ -31,7 +34,7 @@ def openbrace2():
|
||||
def normalfunc():
|
||||
return 1
|
||||
|
||||
##? int()
|
||||
#? int()
|
||||
normalfunc()
|
||||
|
||||
|
||||
@@ -61,5 +64,32 @@ a = 1 if
|
||||
#? int()
|
||||
a
|
||||
|
||||
a2 = [for a2 in [0]]
|
||||
#?
|
||||
a2[0]
|
||||
|
||||
a3 = [for xyz in]
|
||||
#?
|
||||
a3[0]
|
||||
|
||||
a3 = [a4 for in 'b']
|
||||
#? str()
|
||||
a3[0]
|
||||
|
||||
a3 = [a4 for a in for x in y]
|
||||
#?
|
||||
a3[0]
|
||||
|
||||
a = [for a in
|
||||
def break(): pass
|
||||
|
||||
#?
|
||||
a[0]
|
||||
|
||||
a = [a for a in [1,2]
|
||||
def break(): pass
|
||||
#? list()
|
||||
a[0]
|
||||
|
||||
#? []
|
||||
int()).
|
||||
|
||||
Reference in New Issue
Block a user