Skip to content

Commit a1ff54f

Browse files
committed
Show the docstring.
1 parent 67907d6 commit a1ff54f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bpython/urwid.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,13 @@ def _populate_completion(self, main_loop, user_data):
297297
else:
298298
self.frame.body = self.listbox
299299

300+
if self.docstring:
301+
# TODO: use self.format_docstring? needs a width/height...
302+
docstring = self.docstring
303+
else:
304+
docstring = ''
305+
widget_list[2].set_text(('comment', docstring))
306+
300307
def reprint_line(self, lineno, tokens):
301308
edit = self.edits[-len(self.buffer) + lineno - 1]
302309
edit.set_edit_markup(list(format_tokens(tokens)))
@@ -434,7 +441,7 @@ def main(args=None, locals_=None, banner=None):
434441
config.show_source_key))
435442

436443
tooltip = urwid.ListBox(urwid.SimpleListWalker([
437-
urwid.Text(''), urwid.Text('')]))
444+
urwid.Text(''), urwid.Text(''), urwid.Text('')]))
438445
# TODO: this linebox should use the 'main' color.
439446
overlay = Tooltip(urwid.LineBox(tooltip), listbox,
440447
'left', ('relative', 100),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy