Skip to content

Commit de6e387

Browse files
committed
Refactored argspec with replacement named tuple FuncProps
1 parent 6586815 commit de6e387

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bpython/urwid.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,13 +745,14 @@ def _populate_completion(self):
745745
widget_list.pop()
746746
# This is just me flailing around wildly. TODO: actually write.
747747
if self.complete():
748-
if self.argspec:
748+
if self.funcprops:
749749
# This is mostly just stolen from the cli module.
750-
func_name, args, is_bound, in_arg = self.argspec
750+
func_name, args, is_bound = self.funcprops
751+
in_arg = self.arg_pos
751752
args, varargs, varkw, defaults = args[:4]
752753
if py3:
753-
kwonly = self.argspec[1][4]
754-
kwonly_defaults = self.argspec[1][5] or {}
754+
kwonly = self.funcprops.argspec.kwonly
755+
kwonly_defaults = self.funcprops.argspec.kwonly_defaults or {}
755756
else:
756757
kwonly, kwonly_defaults = [], {}
757758
markup = [('bold name', func_name),

0 commit comments

Comments
 (0)