forked from VimPlug/jedi
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
005f69390c | ||
|
|
ecca190462 | ||
|
|
5d0d09bb7d | ||
|
|
972cae4859 | ||
|
|
77bc2d548a |
@@ -3,8 +3,6 @@ omit =
|
|||||||
jedi/_compatibility.py
|
jedi/_compatibility.py
|
||||||
jedi/evaluate/compiled/subprocess/__main__.py
|
jedi/evaluate/compiled/subprocess/__main__.py
|
||||||
jedi/__main__.py
|
jedi/__main__.py
|
||||||
# Is statically analyzed and not actually executed.
|
|
||||||
jedi/evaluate/jedi_typing.py
|
|
||||||
# For now this is not being used.
|
# For now this is not being used.
|
||||||
jedi/refactoring.py
|
jedi/refactoring.py
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
0.15.1 (2019-08-13)
|
||||||
|
+++++++++++++++++++
|
||||||
|
|
||||||
|
- Small bugfix and removal of a print statement
|
||||||
|
|
||||||
0.15.0 (2019-08-11)
|
0.15.0 (2019-08-11)
|
||||||
+++++++++++++++++++
|
+++++++++++++++++++
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
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, \
|
from jedi.api import Script, Interpreter, set_debug_function, \
|
||||||
preload_module, names
|
preload_module, names
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ def file_name_completions(evaluator, module_context, start_leaf, string,
|
|||||||
potential_other_quote = \
|
potential_other_quote = \
|
||||||
code_lines[position[0] - 1][position[1]:position[1] + len(quote)]
|
code_lines[position[0] - 1][position[1]:position[1] + len(quote)]
|
||||||
# Add a quote if it's not already there.
|
# Add a quote if it's not already there.
|
||||||
print(repr(quote), repr(potential_other_quote), position)
|
|
||||||
if quote != potential_other_quote:
|
if quote != potential_other_quote:
|
||||||
name += quote
|
name += quote
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -137,8 +137,10 @@ class ClassMixin(object):
|
|||||||
def is_class(self):
|
def is_class(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def py__call__(self, arguments):
|
def py__call__(self, arguments=None):
|
||||||
from jedi.evaluate.context import TreeInstance
|
from jedi.evaluate.context import TreeInstance
|
||||||
|
if arguments is None:
|
||||||
|
arguments = ValuesArguments([])
|
||||||
return ContextSet([TreeInstance(self.evaluator, self.parent_context, self, arguments)])
|
return ContextSet([TreeInstance(self.evaluator, self.parent_context, self, arguments)])
|
||||||
|
|
||||||
def py__class__(self):
|
def py__class__(self):
|
||||||
@@ -215,7 +217,7 @@ class ClassMixin(object):
|
|||||||
type_ = builtin_from_name(self.evaluator, u'type')
|
type_ = builtin_from_name(self.evaluator, u'type')
|
||||||
assert isinstance(type_, ClassContext)
|
assert isinstance(type_, ClassContext)
|
||||||
if type_ != self:
|
if type_ != self:
|
||||||
for instance in type_.py__call__(ValuesArguments([])):
|
for instance in type_.py__call__():
|
||||||
instance_filters = instance.get_filters()
|
instance_filters = instance.get_filters()
|
||||||
# Filter out self filters
|
# Filter out self filters
|
||||||
next(instance_filters)
|
next(instance_filters)
|
||||||
@@ -223,7 +225,7 @@ class ClassMixin(object):
|
|||||||
yield next(instance_filters)
|
yield next(instance_filters)
|
||||||
|
|
||||||
def get_signatures(self):
|
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()]
|
return [sig.bind(self) for sig in init_funcs.get_signatures()]
|
||||||
|
|
||||||
def get_global_filter(self, until_position=None, origin_scope=None):
|
def get_global_filter(self, until_position=None, origin_scope=None):
|
||||||
|
|||||||
@@ -67,3 +67,8 @@ def test_param_kind_and_name(code, index, param_code, kind, Script, skip_python2
|
|||||||
param = sig.params[index]
|
param = sig.params[index]
|
||||||
assert param.to_string() == param_code
|
assert param.to_string() == param_code
|
||||||
assert param.kind.name == kind
|
assert param.kind.name == kind
|
||||||
|
|
||||||
|
|
||||||
|
def test_staticmethod(Script):
|
||||||
|
s, = Script('staticmethod(').call_signatures()
|
||||||
|
assert s.to_string() == 'staticmethod(f: Callable)'
|
||||||
|
|||||||
Reference in New Issue
Block a user