1
0
forked from VimPlug/jedi

Compare commits

...

5 Commits

Author SHA1 Message Date
Dave Halter
005f69390c Write the CHANGELOG for 0.15.1 2019-08-13 00:18:45 +02:00
Matthias Bussonnier
ecca190462 Remove forgotten debug/print in filename completion. (#1380)
This is in the latest 0.15, and when forwarding path completions to
jedi, print a lot of stuff on the screen.
2019-08-12 12:37:21 +02:00
Dave Halter
5d0d09bb7d staticmethod and a few other cases might not have properly returned its signatures 2019-08-12 09:37:59 +02:00
Dave Halter
972cae4859 Remove reference to a file that doesn't exist anymore 2019-08-12 00:24:35 +02:00
Dave Halter
77bc2d548a Bump version to make it clear that it's a different one than the current one 2019-08-12 00:22:48 +02:00
6 changed files with 16 additions and 7 deletions

View File

@@ -3,8 +3,6 @@ omit =
jedi/_compatibility.py
jedi/evaluate/compiled/subprocess/__main__.py
jedi/__main__.py
# Is statically analyzed and not actually executed.
jedi/evaluate/jedi_typing.py
# For now this is not being used.
jedi/refactoring.py

View File

@@ -3,6 +3,11 @@
Changelog
---------
0.15.1 (2019-08-13)
+++++++++++++++++++
- Small bugfix and removal of a print statement
0.15.0 (2019-08-11)
+++++++++++++++++++

View File

@@ -33,7 +33,7 @@ As you see Jedi is pretty simple and allows you to concentrate on writing a
good text editor, while still having very good IDE features for Python.
"""
__version__ = '0.15.0'
__version__ = '0.15.1'
from jedi.api import Script, Interpreter, set_debug_function, \
preload_module, names

View File

@@ -47,7 +47,6 @@ def file_name_completions(evaluator, module_context, start_leaf, string,
potential_other_quote = \
code_lines[position[0] - 1][position[1]:position[1] + len(quote)]
# Add a quote if it's not already there.
print(repr(quote), repr(potential_other_quote), position)
if quote != potential_other_quote:
name += quote
else:

View File

@@ -137,8 +137,10 @@ class ClassMixin(object):
def is_class(self):
return True
def py__call__(self, arguments):
def py__call__(self, arguments=None):
from jedi.evaluate.context import TreeInstance
if arguments is None:
arguments = ValuesArguments([])
return ContextSet([TreeInstance(self.evaluator, self.parent_context, self, arguments)])
def py__class__(self):
@@ -215,7 +217,7 @@ class ClassMixin(object):
type_ = builtin_from_name(self.evaluator, u'type')
assert isinstance(type_, ClassContext)
if type_ != self:
for instance in type_.py__call__(ValuesArguments([])):
for instance in type_.py__call__():
instance_filters = instance.get_filters()
# Filter out self filters
next(instance_filters)
@@ -223,7 +225,7 @@ class ClassMixin(object):
yield next(instance_filters)
def get_signatures(self):
init_funcs = self.execute_evaluated().py__getattribute__('__init__')
init_funcs = self.py__call__().py__getattribute__('__init__')
return [sig.bind(self) for sig in init_funcs.get_signatures()]
def get_global_filter(self, until_position=None, origin_scope=None):

View File

@@ -67,3 +67,8 @@ def test_param_kind_and_name(code, index, param_code, kind, Script, skip_python2
param = sig.params[index]
assert param.to_string() == param_code
assert param.kind.name == kind
def test_staticmethod(Script):
s, = Script('staticmethod(').call_signatures()
assert s.to_string() == 'staticmethod(f: Callable)'