py-indent-or-complete at the very end of a line produces weird backtrace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
For the simple code block with the cursor placed on the last parenthesis of line 3, invoking py-indent-
import numpy as np
for i in xrange(0,10):
b = np.arange(0,i)
Click <mouse-2> on a completion to select it.
In this buffer, type M-x choose-completion to select the completion near point.
Possible completions are:
--> 265 l = line if cursor_pos is None else line[:cursor_pos]
266 return self._delim_
267
TypeError: 'NoneType' object has no attribute '__getitem__
--> 658 return self.complete(
659
660 def _clean_
/usr/local/
1159 # if text is either None or an empty string, rely on the line buffer
1160 if not text:
-> 1161 text = self.splitter.
1162
1163 # If no line buffer is given, assume the input text is all there was
/usr/local/
263 """Split a line of text with a cursor at the given position.
264 ""
'.join(
/usr/local/
656 and pydb.
657 ""
-------
TypeError Traceback (most recent call last)
<ipython-
----> 1 print('
So I don't really know where this comes from, I can report in on my ubuntu machine, I couldn't repoduce this on my OS X. Is it maybe my python interpreter?
Btw gratz on releasing 6.2.1!
Changed in python-mode: | |
status: | New → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
On 20.10.2015 21:41, <email address hidden> wrote: or-complete gives me a weird error; re.split( l)[-1] text)[1] glob(self, text): lib/python2. 7/dist- packages/ IPython/ core/completer. pyc in complete(self, text, line_buffer, cursor_pos) split_line( line_buffer, cursor_pos) lib/python2. 7/dist- packages/ IPython/ core/completer. pyc in split_line(self, line, cursor_pos) get_ipython( ).Completer. all_completions (''))) #PYTHON-MODE SILENT lib/python2. 7/dist- packages/ IPython/ core/completer. pyc in all_completions (self, text) ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- input-8- 8e220300697e> in<module>()
> Public bug reported:
>
> For the simple code block with the cursor placed on the last parenthesis
> of line 3, invoking py-indent-
>
> import numpy as np
> for i in xrange(0,10):
> b = np.arange(0,i)
>
> Click<mouse-2> on a completion to select it.
> In this buffer, type M-x choose-completion to select the completion near point.
>
> Possible completions are:
>
> --> 265 l = line if cursor_pos is None else line[:cursor_pos]
> 266 return self._delim_
> 267
>
> TypeError: 'NoneType' object has no attribute '__getitem__
>
> --> 658 return self.complete(
> 659
> 660 def _clean_
>
> /usr/local/
> 1159 # if text is either None or an empty string, rely on the line buffer
> 1160 if not text:
> -> 1161 text = self.splitter.
> 1162
> 1163 # If no line buffer is given, assume the input text is all there was
>
> /usr/local/
> 263 """Split a line of text with a cursor at the given position.
> 264 ""
> '.join(
>
> /usr/local/
> 656 and pydb.
> 657 ""
> -------
> TypeError Traceback (most recent call last)
> <ipython-
> ----> 1 print('
>
> So I don't really know where this comes from, I can report in on my
> ubuntu machine, I couldn't repoduce this on my OS X. Is it maybe my
> python interpreter?
>
> Btw gratz on releasing 6.2.1!
>
> ** Affects: python-mode
> Importance: Undecided
> Status: New
>
Thanks reporting. Will look for it ASAP.