1
0
forked from VimPlug/jedi

Big refactoring: BaseDefinition._definnition changes to BaseDefinition._name, because it's a NamePart now.

This also includes changes to tests and some simplifications like deleting the old name logic of Definition.
This commit is contained in:
Dave Halter
2014-09-11 01:02:20 +02:00
parent 58526e2302
commit 9f16555f47
4 changed files with 50 additions and 96 deletions
+3 -3
View File
@@ -160,15 +160,15 @@ class Script(object):
# add named params
for call_sig in self.call_signatures():
# Allow protected access, because it's a public API.
module = call_sig._definition.get_parent_until()
module = call_sig._name.get_parent_until()
# Compiled modules typically don't allow keyword arguments.
if not isinstance(module, compiled.CompiledObject):
for p in call_sig.params:
# Allow access on _definition here, because it's a
# public API and we don't want to make the internal
# Name object public.
if p._definition.get_definition().stars == 0: # no *args/**kwargs
completions.append((p._definition.parent, p))
if p._name.get_definition().stars == 0: # no *args/**kwargs
completions.append((p._name.parent, p))
if not path and not isinstance(user_stmt, pr.Import):
# add keywords