Skip to content

Commit a902f10

Browse files
committed
Use isupper
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 45b373a commit a902f10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎bpython/curtsiesfrontend/parse.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def func_for_letter(l, default='k'):
1919
l = default
2020
elif l == 'D':
2121
l = default.upper()
22-
return partial(fmtstr, fg=cnames[l.lower()], bold=(l.lower() != l))
22+
return partial(fmtstr, fg=cnames[l.lower()], bold=l.isupper())
2323

2424
def color_for_letter(l, default='k'):
2525
if l == 'd':
@@ -44,7 +44,7 @@ def fs_from_match(d):
4444
if d['fg']:
4545

4646
# this isn't according to spec as I understand it
47-
if d['fg'] != d['fg'].lower():
47+
if d['fg'].isupper():
4848
d['bold'] = True
4949
#TODO figure out why boldness isn't based on presence of \x02
5050

0 commit comments

Comments
 (0)