mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-29 03:22:09 +08:00
Make sure get_definitions returns list in Python 3
This commit is contained in:
@@ -381,8 +381,8 @@ def get_definitions(scope):
|
||||
scopes.extend(scope.imports)
|
||||
scopes.extend(scope.statements)
|
||||
scopes.extend(scope.subscopes)
|
||||
return map(Definition, sorted(filter(is_definition, scopes),
|
||||
key=lambda s: s.start_pos))
|
||||
dscopes = sorted(filter(is_definition, scopes), key=lambda s: s.start_pos)
|
||||
return list(map(Definition, dscopes))
|
||||
|
||||
|
||||
class RelatedName(BaseDefinition):
|
||||
|
||||
Reference in New Issue
Block a user