ruff formatted

This commit is contained in:
Tim Bendt
2025-05-08 12:09:43 -06:00
parent e0e7e6ac76
commit 125f500769
17 changed files with 485 additions and 286 deletions

View File

@@ -2,6 +2,7 @@ import asyncio
from textual import work
from textual.widgets import ListView
@work(exclusive=False)
async def delete_current(app) -> None:
app.show_status(f"Deleting message {app.current_message_id}...")
@@ -10,7 +11,7 @@ async def delete_current(app) -> None:
process = await asyncio.create_subprocess_shell(
f"himalaya message delete {app.current_message_id}",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await process.communicate()
# app.reload_needed = True
@@ -20,6 +21,9 @@ async def delete_current(app) -> None:
app.query_one(ListView).index = index
# app.action_next() # Automatically show the next message
else:
app.show_status(f"Failed to delete message {app.current_message_id}. {stderr.decode()}", "error")
app.show_status(
f"Failed to delete message {app.current_message_id}. {stderr.decode()}",
"error",
)
except Exception as e:
app.show_status(f"Error: {e}", "error")