Skip to content

Commit 09f639f

Browse files
committed
fix: address one TODO
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 1db932c commit 09f639f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/uproot_browser/tui/browser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ def on_uproot_selected(self, message: UprootSelected) -> None:
132132

133133
except Exception:
134134
error_widget = content_switcher.query_one("#error", ErrorWidget)
135-
# MyPy doesn't like assignment with different signatures - TODO: apply Error here
136-
error_widget.exc = sys.exc_info() # type: ignore[assignment]
135+
exc = sys.exc_info()
136+
assert exc[1]
137+
error_widget.exc = Error(exc)
137138
content_switcher.current = "error"
138139

139140

src/uproot_browser/tui/right_panel.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,8 @@ def exc(self) -> Error | None:
111111
return self._exc
112112

113113
@exc.setter
114-
def exc(
115-
self, value: tuple[type[BaseException], BaseException, TracebackType]
116-
) -> None:
117-
self._exc = Error(value)
114+
def exc(self, value: Error) -> None:
115+
self._exc = value
118116
self.clear()
119117
self.write(self._exc)
120118
# self.refresh()

0 commit comments

Comments
 (0)