diff --git a/docs/docs/installation.rst b/docs/docs/installation.rst index 9058cf55..1070a030 100644 --- a/docs/docs/installation.rst +++ b/docs/docs/installation.rst @@ -57,19 +57,15 @@ Others We are in the discussion of adding |jedi| to the Fedora repositories. -Manual installation from a downloaded package +Manual installation from GitHub --------------------------------------------- -If you prefer not to use an automated package installer, you can `download -`__ a current copy of -|jedi| and install it manually. - -To install it, navigate to the directory containing `setup.py` on your console -and type:: +If you prefer not to use an automated package installer, you can clone the source from GitHub and install it manually. To install it, run these commands:: + git clone --recurse-submodules https://github.com/davidhalter/jedi + cd jedi sudo python setup.py install - Inclusion as a submodule ------------------------ diff --git a/jedi/evaluate/context/klass.py b/jedi/evaluate/context/klass.py index 9c329d5d..acf68b67 100644 --- a/jedi/evaluate/context/klass.py +++ b/jedi/evaluate/context/klass.py @@ -233,14 +233,16 @@ class ClassContext(use_metaclass(CachedMetaClass, ClassMixin, FunctionAndClassBa if arglist: from jedi.evaluate import arguments args = arguments.TreeArguments(self.evaluator, self.parent_context, arglist) - return [value for key, value in args.unpack() if key is None] - else: - if self.py__name__() == 'object' \ - and self.parent_context == self.evaluator.builtins_module: - return [] - return [LazyKnownContexts( - self.evaluator.builtins_module.py__getattribute__('object') - )] + lst = [value for key, value in args.unpack() if key is None] + if lst: + return lst + + if self.py__name__() == 'object' \ + and self.parent_context == self.evaluator.builtins_module: + return [] + return [LazyKnownContexts( + self.evaluator.builtins_module.py__getattribute__('object') + )] def py__getitem__(self, index_context_set, contextualized_node): from jedi.evaluate.gradual.typing import LazyGenericClass diff --git a/test/completion/stdlib.py b/test/completion/stdlib.py index 541e9024..7127efea 100644 --- a/test/completion/stdlib.py +++ b/test/completion/stdlib.py @@ -276,3 +276,17 @@ qsplit = shlex.split("foo, ferwerwerw werw werw e") for part in qsplit: #? str() part + +# ----------------- +# Unknown metaclass +# ----------------- + +# Github issue 1321 +class Meta(object): + pass + +class Test(metaclass=Meta): + def test_function(self): + result = super(Test, self).test_function() + #? [] + result.