forked from VimPlug/jedi
Fix an issue where a default value was wrongly used
This commit is contained in:
@@ -316,7 +316,7 @@ class DirectObjectAccess(object):
|
|||||||
# -> just set it to None
|
# -> just set it to None
|
||||||
if default is _sentinel:
|
if default is _sentinel:
|
||||||
raise
|
raise
|
||||||
return default
|
return self._create_access(default)
|
||||||
|
|
||||||
def get_safe_value(self):
|
def get_safe_value(self):
|
||||||
if type(self._obj) in (bool, bytes, float, int, str, unicode, slice):
|
if type(self._obj) in (bool, bytes, float, int, str, unicode, slice):
|
||||||
|
|||||||
@@ -290,6 +290,9 @@ def test_type(Script):
|
|||||||
else:
|
else:
|
||||||
assert c.type in ('function', 'instance')
|
assert c.type in ('function', 'instance')
|
||||||
|
|
||||||
|
for c in Script('list.').completions():
|
||||||
|
assert c.type
|
||||||
|
|
||||||
# Github issue #397, type should never raise an error.
|
# Github issue #397, type should never raise an error.
|
||||||
for c in Script('import os; os.path.').completions():
|
for c in Script('import os; os.path.').completions():
|
||||||
assert c.type
|
assert c.type
|
||||||
|
|||||||
Reference in New Issue
Block a user