Skip to content

Commit dc667b6

Browse files
committed
Directly initialize f_strings
1 parent b3b74b8 commit dc667b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bpython/curtsiesfrontend/interpreter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ class BPythonFormatter(Formatter):
4444
straightforward."""
4545

4646
def __init__(self, color_scheme, **options):
47-
self.f_strings = {}
48-
for k, v in color_scheme.items():
49-
self.f_strings[k] = f"\x01{v}"
47+
self.f_strings = {k: f"\x01{v}" for k, v in color_scheme.items()}
5048
super().__init__(**options)
5149

5250
def format(self, tokensource, outfile):

0 commit comments

Comments
 (0)