Skip to content

Commit 3ba7c42

Browse files
[pre-commit.ci] pre-commit autoupdate (#151)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.281 → v0.0.282](astral-sh/ruff-pre-commit@v0.0.281...v0.0.282) * fix: Textual 0.32 renamed TextLog Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <[email protected]>
1 parent 1b85acb commit 3ba7c42

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
- id: trailing-whitespace
2020

2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: "v0.0.281"
22+
rev: "v0.0.282"
2323
hooks:
2424
- id: ruff
2525
args: ["--fix", "--show-fixes"]
@@ -31,10 +31,10 @@ repos:
3131
files: src
3232
additional_dependencies:
3333
- rich>=12
34-
- click==8.1.3
34+
- click
3535
- hist
3636
- numpy
37-
- textual>=0.27
37+
- textual>=0.32
3838

3939
- repo: https://github.com/codespell-project/codespell
4040
rev: v2.2.5

src/uproot_browser/tui/right_panel.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
import textual.widget
1313
import textual.widgets
1414

15+
try:
16+
from textual.widgets import RichLog
17+
except ImportError:
18+
from textual.widgets import ( # type: ignore[attr-defined,no-redef]
19+
TextLog as RichLog,
20+
)
21+
1522
import uproot_browser.plot
1623

1724
LOGO = """\
@@ -103,7 +110,7 @@ def __rich_console__(
103110
yield rich.traceback.Traceback.from_exception(*self.exc, width=width)
104111

105112

106-
class ErrorWidget(textual.widgets.TextLog):
113+
class ErrorWidget(RichLog):
107114
_exc: Error | None
108115

109116
@property

0 commit comments

Comments
 (0)