mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-11 08:11:50 +08:00
Improve some documentation about name with symbols, name and completion.
This commit is contained in:
@@ -432,22 +432,35 @@ class Completion(BaseDefinition):
|
|||||||
"""
|
"""
|
||||||
Return the rest of the word, e.g. completing ``isinstance``::
|
Return the rest of the word, e.g. completing ``isinstance``::
|
||||||
|
|
||||||
# <-- Cursor is here
|
isinstan# <-- Cursor is here
|
||||||
|
|
||||||
would return the string 'ce'. It also adds additional stuff, depending
|
would return the string 'ce'. It also adds additional stuff, depending
|
||||||
on your `settings.py`.
|
on your `settings.py`.
|
||||||
|
|
||||||
|
Assuming the following function definition::
|
||||||
|
|
||||||
|
def foo(param=0):
|
||||||
|
pass
|
||||||
|
|
||||||
|
completing ``foo(par`` would give a ``Completion`` which `complete`
|
||||||
|
would be `am=`
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return self._complete(True)
|
return self._complete(True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name_with_symbols(self):
|
def name_with_symbols(self):
|
||||||
"""
|
"""
|
||||||
Similar to :attr:`name`, but like :attr:`name`
|
Similar to :attr:`name`, but like :attr:`name` returns also the
|
||||||
returns also the symbols, for example::
|
symbols, for example assuming the following function definition::
|
||||||
|
|
||||||
list()
|
def foo(param=0):
|
||||||
|
pass
|
||||||
|
|
||||||
|
completing ``foo(`` would give a ``Completion`` which
|
||||||
|
``name_with_symbols`` would be "param=".
|
||||||
|
|
||||||
would return ``.append`` and others (which means it adds a dot).
|
|
||||||
"""
|
"""
|
||||||
return self._complete(False)
|
return self._complete(False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user