mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 01:57:06 +08:00
Fix an issue with mixed objects.
This commit is contained in:
@@ -127,7 +127,11 @@ def find_syntax_node_name(evaluator, python_object):
|
|||||||
if name_str == '<lambda>':
|
if name_str == '<lambda>':
|
||||||
return None # It's too hard to find lambdas.
|
return None # It's too hard to find lambdas.
|
||||||
|
|
||||||
names = module.used_names[name_str]
|
# Doesn't always work (e.g. os.stat_result)
|
||||||
|
try:
|
||||||
|
names = module.used_names[name_str]
|
||||||
|
except KeyError:
|
||||||
|
return None
|
||||||
names = [n for n in names if n.is_definition()]
|
names = [n for n in names if n.is_definition()]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user