Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Sep 10, 2024
1 parent 71e730b commit 0ff30d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rich/syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class _SyntaxHighlightRange(NamedTuple):
style: StyleType
start: SyntaxPosition
end: SyntaxPosition
before: bool = False
style_before: bool = False


class Syntax(JupyterMixin):
Expand Down Expand Up @@ -793,7 +793,7 @@ def _apply_stylized_ranges(self, text: Text) -> None:
newlines_offsets, stylized_range.end
)
if start is not None and end is not None:
if stylized_range.before:
if stylized_range.style_before:
text.stylize_before(stylized_range.style, start, end)
else:
text.stylize(stylized_range.style, start, end)
Expand Down
2 changes: 1 addition & 1 deletion rich/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]:


if __name__ == "__main__": # pragma: no cover
install()
install(show_locals=True)
import sys

def bar(
Expand Down

0 comments on commit 0ff30d0

Please sign in to comment.