mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Get doctest completions working, fixes #860
This commit is contained in:
@@ -252,3 +252,46 @@ def import_issues(foo):
|
||||
"""
|
||||
#? datetime.datetime()
|
||||
foo
|
||||
|
||||
|
||||
# -----------------
|
||||
# Doctest completions
|
||||
# -----------------
|
||||
|
||||
def doctest_with_gt():
|
||||
"""
|
||||
x
|
||||
|
||||
>>> somewhere_in_docstring = 3
|
||||
#? ['import_issues']
|
||||
>>> import_issu
|
||||
#? ['somewhere_in_docstring']
|
||||
>>> somewhere_
|
||||
|
||||
blabla
|
||||
|
||||
>>> haha = 3
|
||||
#? ['haha']
|
||||
>>> hah
|
||||
#? ['doctest_with_space']
|
||||
>>> doctest_with_sp
|
||||
"""
|
||||
|
||||
def doctest_with_space():
|
||||
"""
|
||||
x
|
||||
#? ['import_issues']
|
||||
import_issu
|
||||
"""
|
||||
|
||||
def doctest_without_ending():
|
||||
"""
|
||||
#? []
|
||||
import_issu
|
||||
ha
|
||||
|
||||
no_ending = False
|
||||
#? ['import_issues']
|
||||
import_issu
|
||||
#? ['no_ending']
|
||||
no_endin
|
||||
|
||||
Reference in New Issue
Block a user