mirror of
https://github.com/1j01/textual-paint.git
synced 2024-11-28 01:34:42 +03:00
Update textual to 0.36.0
All tests pass... but pyright shows the signature for app.exit changed.
This commit is contained in:
parent
e435e0a53f
commit
268380a0c6
@ -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.35.0
|
||||
textual==0.36.0
|
||||
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
|
||||
|
@ -118,7 +118,7 @@ class GalleryApp(App[None]):
|
||||
gallery_folder = Path(args.path)
|
||||
|
||||
if not gallery_folder.exists():
|
||||
self.exit(None, Text(f"Folder or file not found: {gallery_folder}"))
|
||||
self.exit(None, message=Text(f"Folder or file not found: {gallery_folder}"))
|
||||
return
|
||||
|
||||
file_to_show = None
|
||||
@ -179,17 +179,17 @@ class GalleryApp(App[None]):
|
||||
try:
|
||||
index_to_show = [*map(str, paths)].index(str(file_to_show))
|
||||
except ValueError:
|
||||
self.exit(None, Text(f"Not an ANSI art file ({exts_str}): {file_to_show}"))
|
||||
self.exit(None, message=Text(f"Not an ANSI art file ({exts_str}): {file_to_show}"))
|
||||
return
|
||||
else:
|
||||
index_to_show = 0
|
||||
|
||||
if len(paths) == 0:
|
||||
self.exit(None, Text(f"No ANSI art ({exts_str}) found in folder: {gallery_folder}"))
|
||||
self.exit(None, message=Text(f"No ANSI art ({exts_str}) found in folder: {gallery_folder}"))
|
||||
return
|
||||
|
||||
# Debugging
|
||||
# self.exit(None, Text("\n".join(str(path) for path in paths) + f"\n\nindex_to_show: {index_to_show}\ntotal: {len(paths)}"))
|
||||
# self.exit(None, message=Text("\n".join(str(path) for path in paths) + f"\n\nindex_to_show: {index_to_show}\ntotal: {len(paths)}"))
|
||||
# return
|
||||
|
||||
self.paths = paths
|
||||
|
@ -159,7 +159,7 @@ class PilotRecorder():
|
||||
self.run() # restart and replay
|
||||
elif event.key == "ctrl+c":
|
||||
self.save_replay()
|
||||
self.app.exit(None, Text("Saved test recording to " + self.output_file))
|
||||
self.app.exit(None, message=Text("Saved test recording to " + self.output_file))
|
||||
else:
|
||||
if self.replaying:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user