Update textual to 0.37.1

This commit is contained in:
Isaiah Odhner 2023-09-18 22:37:50 -04:00
parent 268380a0c6
commit 2162ddd125
3 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,7 @@ pyperclip==1.8.2
pyxdg==0.28 # xdg module, used for wallpaper setting; optional, falls back to ~/.config
rich==13.3.5
stransi==0.3.0
textual==0.36.0
textual==0.37.1
textual-dev==1.1.0 # for development (`textual` CLI)
watchdog==3.0.0 # for development; optional (only used when --restart-on-changes is passed)
types-Pillow==10.0.0.1 # for development

View File

@ -102,7 +102,9 @@ class FileDialogWindow(DialogWindow):
Called when a file/folder is selected in the DirectoryTree.
This message comes from Tree.
DirectoryTree gives FileSelected, but only for files, not folders.
~~DirectoryTree gives FileSelected, but only for files, not folders.~~
Update: as of Textual 0.37.0, DirectoryTree gives DirectorySelected for folders.
TODO: does that make it cleaner, or is it still awkward because it's two different messages?
"""
assert event.node.data

View File

@ -467,6 +467,7 @@ class MessageBox(DialogWindow):
self.message_widget = message
if error:
# expandable error details
# TODO: use new Collapsible widget from Textual 0.37.0
import traceback
details = "\n".join(traceback.format_exception(error))
self.details_widget = Container(Static(details, markup=False, classes="details"))