diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index ff75b271..c94de681 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -136,7 +136,10 @@ class Script(object): if not dot: # add named params for call_sig in self.call_signatures(): - if not isinstance(call_sig.module, compiled.CompiledObject): + # allow protected access, because it's a public API. + module = call_sig._executable.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 diff --git a/jedi/api/classes.py b/jedi/api/classes.py index 664beddc..eab09b54 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -586,10 +586,6 @@ class CallSignature(object): """ The name (e.g. 'isinstance') as a string. """ return unicode(self._executable.name) - @property - def module(self): - return self._executable.get_parent_until() - def __repr__(self): return '<%s: %s index %s>' % (type(self).__name__, self._executable, self.index)