mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
parent_stmt property never raises an error now, returns None
This commit is contained in:
@@ -746,8 +746,10 @@ class Call(object):
|
|||||||
def parent_stmt(self):
|
def parent_stmt(self):
|
||||||
if self._parent_stmt:
|
if self._parent_stmt:
|
||||||
return self._parent_stmt
|
return self._parent_stmt
|
||||||
else:
|
elif self.parent:
|
||||||
return self.parent.parent_stmt
|
return self.parent.parent_stmt
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
@parent_stmt.setter
|
@parent_stmt.setter
|
||||||
def parent_stmt(self, value):
|
def parent_stmt(self, value):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ second = ""
|
|||||||
class TestClass(object):
|
class TestClass(object):
|
||||||
var_class = TestClass(1)
|
var_class = TestClass(1)
|
||||||
|
|
||||||
def __init__(self2, first_param, second_param):
|
def __init__(self2, first_param, second_param, third=1.0):
|
||||||
self2.var_inst = first_param
|
self2.var_inst = first_param
|
||||||
self2.second = second_param
|
self2.second = second_param
|
||||||
self2.first = first_param
|
self2.first = first_param
|
||||||
|
|||||||
Reference in New Issue
Block a user