terminalwriter: ran linting on file.
This commit is contained in:
parent
cb499d7483
commit
b6d830a748
|
@ -229,7 +229,7 @@ class TerminalWriter:
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set the terminal formatter to better performing formatters is user environement allows for it
|
# Set the terminal formatter to better performing formatters is user environement allows for it
|
||||||
if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
|
if os.environ.get("COLORTERM", "") in ("truecolor", "24bit"):
|
||||||
# Create new styling for True Color Formatter
|
# Create new styling for True Color Formatter
|
||||||
class UpdatedTrueStyle(Style):
|
class UpdatedTrueStyle(Style):
|
||||||
# Set color values for the True Color Formatter
|
# Set color values for the True Color Formatter
|
||||||
|
@ -259,9 +259,14 @@ class TerminalWriter:
|
||||||
Error: ("ansibrightblue"),
|
Error: ("ansibrightblue"),
|
||||||
}
|
}
|
||||||
|
|
||||||
from pygments.formatters.terminal256 import TerminalTrueColorFormatter
|
from pygments.formatters.terminal256 import (
|
||||||
terminal_formatter = TerminalTrueColorFormatter(style=UpdatedTrueStyle)
|
TerminalTrueColorFormatter,
|
||||||
elif '256' in os.environ.get('TERM', ''):
|
)
|
||||||
|
|
||||||
|
terminal_formatter = TerminalTrueColorFormatter(
|
||||||
|
style=UpdatedTrueStyle
|
||||||
|
)
|
||||||
|
elif "256" in os.environ.get("TERM", ""):
|
||||||
# Create new styling for 256 Formatter
|
# Create new styling for 256 Formatter
|
||||||
class Updated256Style(Style):
|
class Updated256Style(Style):
|
||||||
# Set color values for the 256 Formatter
|
# Set color values for the 256 Formatter
|
||||||
|
@ -292,12 +297,13 @@ class TerminalWriter:
|
||||||
}
|
}
|
||||||
|
|
||||||
from pygments.formatters.terminal256 import Terminal256Formatter
|
from pygments.formatters.terminal256 import Terminal256Formatter
|
||||||
|
|
||||||
terminal_formatter = Terminal256Formatter(style=Updated256Style)
|
terminal_formatter = Terminal256Formatter(style=Updated256Style)
|
||||||
else:
|
else:
|
||||||
terminal_formatter = TerminalFormatter(
|
terminal_formatter = TerminalFormatter(
|
||||||
bg=os.getenv("PYTEST_THEME_MODE", "dark"),
|
bg=os.getenv("PYTEST_THEME_MODE", "dark"),
|
||||||
style=os.getenv("PYTEST_THEME"),
|
style=os.getenv("PYTEST_THEME"),
|
||||||
)
|
)
|
||||||
highlighted: str = highlight(
|
highlighted: str = highlight(
|
||||||
source,
|
source,
|
||||||
Lexer(),
|
Lexer(),
|
||||||
|
|
Loading…
Reference in New Issue