mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-08 05:05:43 +08:00
More tests and better understanding of if/try branches name resolution.
This commit is contained in:
1 parent
481a917ada
commit
5b81a2375d
5 files changed
+107
-19
No files matched your search
@@ -1,3 +1,39 @@
|
||||
# -----------------
|
||||
# First a few name resolution things
|
||||
# -----------------
|
||||
|
||||
x = 3
|
||||
if NOT_DEFINED:
|
||||
x = ''
|
||||
#? 6 int()
|
||||
elif x:
|
||||
pass
|
||||
else:
|
||||
#? int()
|
||||
x
|
||||
|
||||
x = 1
|
||||
try:
|
||||
x = ''
|
||||
#? 8 int() str()
|
||||
except x:
|
||||
#? 5 int() str()
|
||||
x
|
||||
x = 1.0
|
||||
else:
|
||||
#? 5 int() str()
|
||||
x
|
||||
x = list
|
||||
finally:
|
||||
#? 5 int() str() float() list
|
||||
x
|
||||
x = tuple
|
||||
|
||||
|
||||
# -----------------
|
||||
# Return checks
|
||||
# -----------------
|
||||
|
||||
def foo(x):
|
||||
if 1.0:
|
||||
return 1
|
||||
|
||||
Reference in new issue
Block a user