mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-28 07:56:51 +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):
|
||||
if self._parent_stmt:
|
||||
return self._parent_stmt
|
||||
else:
|
||||
elif self.parent:
|
||||
return self.parent.parent_stmt
|
||||
else:
|
||||
return None
|
||||
|
||||
@parent_stmt.setter
|
||||
def parent_stmt(self, value):
|
||||
|
||||
@@ -6,7 +6,7 @@ second = ""
|
||||
class TestClass(object):
|
||||
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.second = second_param
|
||||
self2.first = first_param
|
||||
|
||||
Reference in New Issue
Block a user