Skip to content

Commit a489649

Browse files
tomasr8AA-Turner
andauthored
Simplify code
Co-authored-by: Adam Turner <[email protected]>
1 parent 4fc5e27 commit a489649

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/json/tool.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131

3232

3333
def _replace_match_callback(match):
34-
for key in _colors:
34+
for key, color in _colors.items():
3535
if m := match.group(key):
36-
color = _colors[key]
3736
return f"{color}{m}{ANSIColors.RESET}"
3837
return match.group()
3938

0 commit comments

Comments
 (0)