##// END OF EJS Templates
Fixed typo and added small Jedi description
luciana -
Show More
@@ -67,9 +67,9 b' Experimental'
67 67
68 68 Starting with IPython 6.0, this module can make use of the Jedi library to
69 69 generate completions both using static analysis of the code, and dynamically
70 inspecting multiple namespaces. The APIs attached to this new mechanism is
71 unstable and will raise unless use in an :any:`provisionalcompleter` context
72 manager.
70 inspecting multiple namespaces. Jedi is an autocompletion and static analysis
71 for Python. The APIs attached to this new mechanism is unstable and will
72 raise unless use in an :any:`provisionalcompleter` context manager.
73 73
74 74 You will find that the following are experimental:
75 75
@@ -84,7 +84,7 b' You will find that the following are experimental:'
84 84
85 85 We welcome any feedback on these new API, and we also encourage you to try this
86 86 module in debug mode (start IPython with ``--Completer.debug=True``) in order
87 to have extra logging information is :any:`jedi` is crashing, or if current
87 to have extra logging information if :any:`jedi` is crashing, or if current
88 88 IPython completer pending deprecations are returning results not yet handled
89 89 by :any:`jedi`
90 90
@@ -1986,9 +1986,12 b' class IPCompleter(Completer):'
1986 1986 name_matches = []
1987 1987 for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches):
1988 1988 name_text, name_matches = meth(base_text)
1989 completion_text, completion_matches = self.fwd_unicode_match(base_text)
1989 1990 if name_text:
1990 1991 return name_text, name_matches[:MATCHES_LIMIT], \
1991 1992 [meth.__qualname__]*min(len(name_matches), MATCHES_LIMIT), ()
1993 elif (completion_text):
1994 return completion_text, completion_matches, ()
1992 1995
1993 1996
1994 1997 # If no line buffer is given, assume the input text is all there was
@@ -2059,3 +2062,14 b' class IPCompleter(Completer):'
2059 2062 self.matches = _matches
2060 2063
2061 2064 return text, _matches, origins, completions
2065
2066 def fwd_unicode_match(self, text:str) -> Tuple[str, list]:
2067 # `text` is what the user typed. If it start with `\`,
2068 # then lookup in `names` (defined above), all the possible candidates.
2069 # return text, [list of candidates]
2070 unicode_matches = []
2071 if (text[0] == "\\"):
2072 # lookup in names
2073 pass
2074 else:
2075 return [text,unicode_matches]
General Comments 0
You need to be logged in to leave comments. Login now