X Tutup
Skip to content

Commit 439faba

Browse files
fix argspec **kwargs formatting
--HG-- branch : scroll-frontend
1 parent df0131d commit 439faba

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bpython/scrollfrontend/replpainter.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import logging
33

4-
from fmtstr.fmtfuncs import *
4+
from fmtstr.fmtfuncs import bold
55
from fmtstr.fsarray import fsarray
66
from fmtstr.bpythonparse import func_for_letter
77
from fmtstr.fmtstr import fmtstr, linesplit
@@ -10,12 +10,9 @@
1010
if not py3:
1111
import inspect
1212

13-
14-
#TODO take the boring parts of repl.paint out into here?
15-
1613
# All paint functions should
1714
# * return an array of the width they were asked for
18-
# * return an array not larger than the height they were asked for
15+
# * return an array not taller than the height they were asked for
1916

2017
def display_linize(msg, columns):
2118
"""Returns lines obtained by splitting msg over multiple lines.
@@ -128,7 +125,8 @@ def formatted_argspec(argspec, columns, config):
128125

129126
if _kwargs:
130127
if args or _args or (py3 and kwonly):
131-
s += token_color('**%s' % (_kwargs,))
128+
s += punctuation_color(', ')
129+
s += token_color('**%s' % (_kwargs,))
132130
s += punctuation_color(')')
133131

134132
return linesplit(s, columns)

0 commit comments

Comments
 (0)
X Tutup