Merge branch 'dev' of github.com:davidhalter/jedi into dev

This commit is contained in:
Dave Halter
2017-04-30 02:34:38 +02:00
5 changed files with 20 additions and 8 deletions

View File

@@ -42,6 +42,7 @@ Cristi Burcă (@scribu)
bstaint (@bstaint) bstaint (@bstaint)
Mathias Rav (@Mortal) <rav@cs.au.dk> Mathias Rav (@Mortal) <rav@cs.au.dk>
Daniel Fiterman (@dfit99) <fitermandaniel2@gmail.com> Daniel Fiterman (@dfit99) <fitermandaniel2@gmail.com>
Simon Ruggier (@sruggier)
Note: (@user) means a github user name. Note: (@user) means a github user name.

View File

@@ -93,10 +93,10 @@ class Script(object):
encoding='utf-8', source_path=None, source_encoding=None, encoding='utf-8', source_path=None, source_encoding=None,
sys_path=None): sys_path=None):
if source_path is not None: if source_path is not None:
warnings.warn("Use path instead of source_path.", DeprecationWarning) warnings.warn("Deprecated since version 0.7. Use path instead of source_path.", DeprecationWarning, stacklevel=2)
path = source_path path = source_path
if source_encoding is not None: if source_encoding is not None:
warnings.warn("Use encoding instead of source_encoding.", DeprecationWarning) warnings.warn("Deprecated since version 0.8. Use encoding instead of source_encoding.", DeprecationWarning, stacklevel=2)
encoding = source_encoding encoding = source_encoding
self._orig_path = path self._orig_path = path
@@ -158,7 +158,7 @@ class Script(object):
Use :attr:`.path` instead. Use :attr:`.path` instead.
.. todo:: Remove! .. todo:: Remove!
""" """
warnings.warn("Use path instead of source_path.", DeprecationWarning) warnings.warn("Deprecated since version 0.7. Use path instead of source_path.", DeprecationWarning, stacklevel=2)
return self.path return self.path
def __repr__(self): def __repr__(self):

View File

@@ -254,7 +254,7 @@ class BaseDefinition(object):
Use :meth:`.docstring` instead. Use :meth:`.docstring` instead.
.. todo:: Remove! .. todo:: Remove!
""" """
warnings.warn("Use docstring() instead.", DeprecationWarning) warnings.warn("Deprecated since Jedi 0.8. Use docstring() instead.", DeprecationWarning, stacklevel=2)
return self.docstring(raw=False) return self.docstring(raw=False)
@property @property
@@ -264,7 +264,7 @@ class BaseDefinition(object):
Use :meth:`.docstring` instead. Use :meth:`.docstring` instead.
.. todo:: Remove! .. todo:: Remove!
""" """
warnings.warn("Use docstring() instead.", DeprecationWarning) warnings.warn("Deprecated since Jedi 0.8. Use docstring() instead.", DeprecationWarning, stacklevel=2)
return self.docstring(raw=True) return self.docstring(raw=True)
@property @property
@@ -656,7 +656,7 @@ class CallSignature(Definition):
The name (e.g. 'isinstance') as a string. The name (e.g. 'isinstance') as a string.
""" """
warnings.warn("Use name instead.", DeprecationWarning) warnings.warn("Deprecated since Jedi 0.8. Use name instead.", DeprecationWarning, stacklevel=2)
return self.name return self.name
@property @property
@@ -685,7 +685,7 @@ class _Param(Definition):
A function to get the whole code of the param. A function to get the whole code of the param.
""" """
warnings.warn("Use description instead.", DeprecationWarning) warnings.warn("Deprecated since version 0.8. Use description instead.", DeprecationWarning, stacklevel=2)
return self.description return self.description

View File

@@ -29,7 +29,7 @@ from jedi.evaluate.iterable import SequenceLiteralContext, FakeSequence
DOCSTRING_PARAM_PATTERNS = [ DOCSTRING_PARAM_PATTERNS = [
r'\s*:type\s+%s:\s*([^\n]+)', # Sphinx r'\s*:type\s+%s:\s*([^\n]+)', # Sphinx
r'\s*:param\s+(\w+)\s+%s:[^\n]+', # Sphinx param with type r'\s*:param\s+(\w+)\s+%s:[^\n]*', # Sphinx param with type
r'\s*@type\s+%s:\s*([^\n]+)', # Epydoc r'\s*@type\s+%s:\s*([^\n]+)', # Epydoc
] ]

View File

@@ -49,6 +49,17 @@ def sphinxy2(a, b, x):
#? #?
sphinxy2() sphinxy2()
def sphinxy_param_type_wrapped(a):
"""
:param str a:
Some description wrapped onto the next line with no space after the
colon.
"""
#? str()
a
# local classes -> github #370 # local classes -> github #370
class ProgramNode(): class ProgramNode():
pass pass