Skip to content
Snippets Groups Projects
Commit ac9f6330 authored by Mateusz Żebrak's avatar Mateusz Żebrak Committed by Mateusz Kudela
Browse files

CliveActionDialog and CliveInfoDialog should be abstract

parent 543eca54
No related branches found
No related tags found
2 merge requests!600v1.27.5.21 Release,!567Show dialogs instead of operation summary screens
from __future__ import annotations from __future__ import annotations
from abc import abstractmethod from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Literal from typing import TYPE_CHECKING, Literal
from textual import on from textual import on
...@@ -102,7 +102,7 @@ class CliveBaseDialog(ModalScreen[ScreenResultT], CliveWidget, AbstractClassMess ...@@ -102,7 +102,7 @@ class CliveBaseDialog(ModalScreen[ScreenResultT], CliveWidget, AbstractClassMess
"""Yield all the content with buttons.""" """Yield all the content with buttons."""
class CliveActionDialog(CliveBaseDialog[ScreenResultT]): class CliveActionDialog(CliveBaseDialog[ScreenResultT], ABC):
BINDINGS = [Binding("escape", "cancel", "Quit")] BINDINGS = [Binding("escape", "cancel", "Quit")]
class Confirmed(Message): class Confirmed(Message):
...@@ -133,7 +133,7 @@ class CliveActionDialog(CliveBaseDialog[ScreenResultT]): ...@@ -133,7 +133,7 @@ class CliveActionDialog(CliveBaseDialog[ScreenResultT]):
self.app.pop_screen() self.app.pop_screen()
class CliveInfoDialog(CliveBaseDialog[ScreenResultT]): class CliveInfoDialog(CliveBaseDialog[ScreenResultT], ABC):
BINDINGS = [Binding("escape", "close", "Quit")] BINDINGS = [Binding("escape", "close", "Quit")]
def create_buttons_content(self) -> ComposeResult: def create_buttons_content(self) -> ComposeResult:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment