Skip to content

Commit

Permalink
refactor: use inbuilt app functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Nov 18, 2024
1 parent 1f9e136 commit a3d674f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dooit/ui/tui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import webbrowser
from typing import Optional
from textual import on
from textual.app import App
Expand Down Expand Up @@ -87,7 +86,7 @@ def global_message(self, event: DooitEvent):
self.bar.refresh()

@on(ShutDown)
def shutdown(self, event: ShutDown):
def shutdown(self, _: ShutDown):
self.api.css.cleanup()

@on(ModeChanged)
Expand All @@ -104,7 +103,7 @@ async def quit_app(self):
await self.action_quit()

async def action_open_url(self, url: str) -> None: # pragma: no cover
webbrowser.open(url, new=2)
self.open_url(url)


if __name__ == "__main__": # pragma: no cover
Expand Down

0 comments on commit a3d674f

Please sign in to comment.