Theme used for Traceback should not inherit defaults

This commit is contained in:
Darren Burns 2022-01-06 16:39:22 +00:00
parent 972c43ed32
commit d8ff3597ae
1 changed files with 6 additions and 9 deletions

View File

@ -6,7 +6,8 @@ import sys
from dataclasses import dataclass, field
from traceback import walk_tb
from types import ModuleType, TracebackType
from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union
from typing import (Any, Callable, Dict, Iterable, List, Optional, Sequence,
Type, Union)
from pygments.lexers import guess_lexer_for_filename
from pygments.token import Comment, Keyword, Name, Number, Operator, String
@ -16,13 +17,8 @@ from pygments.token import Token
from . import pretty
from ._loop import loop_first, loop_last
from .columns import Columns
from .console import (
Console,
ConsoleOptions,
ConsoleRenderable,
RenderResult,
group,
)
from .console import (Console, ConsoleOptions, ConsoleRenderable, RenderResult,
group)
from .constrain import Constrain
from .highlighter import RegexHighlighter, ReprHighlighter
from .panel import Panel
@ -443,7 +439,8 @@ class Traceback:
"scope.equals": token_style(Operator),
"scope.key": token_style(Name),
"scope.key.special": token_style(Name.Constant) + Style(dim=True),
}
},
inherit=False,
)
highlighter = ReprHighlighter()