Coding style

- Use if-expressions where possible.
This commit is contained in:
Andrew Hamilton 2022-06-29 00:09:55 +10:00
parent 07e0ce9f56
commit 84cb34005e

View file

@ -45,10 +45,9 @@ def is_bright_theme(theme):
def highlight_line(line, theme=None): def highlight_line(line, theme=None):
if theme is not None and is_bright_theme(theme): blend_color = (termstr.Color.black if theme is not None and is_bright_theme(theme)
return highlight_str(line, termstr.Color.black, 0.8) else termstr.Color.white)
else: return highlight_str(line, blend_color, 0.8)
return highlight_str(line, termstr.Color.white, 0.8)
NATIVE_STYLE = pygments.styles.get_style_by_name("paraiso-dark") NATIVE_STYLE = pygments.styles.get_style_by_name("paraiso-dark")