-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create abstract messenger for extendability
- Loading branch information
Showing
7 changed files
with
126 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
"""OH MY GOD package built upon rich console interface""" | ||
|
||
__version__ = "0.1.5" | ||
|
||
__version__ = "0.2.0" | ||
|
||
from .main import OhMyGod | ||
from .message import Message as HolyMessage | ||
from .utils import Color as HolyColor | ||
from .utils import Color | ||
from .messenger.buddha import Buddha | ||
|
||
__all__ = ["OhMyGod", "HolyMessage", "HolyColor"] | ||
__all__ = ["OhMyGod", "Color", "Buddha"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
from abc import ABC, abstractmethod | ||
from rich.text import Text | ||
from typing import List | ||
|
||
from ..utils import _Message | ||
|
||
|
||
class _Messenger(ABC): | ||
@property | ||
@abstractmethod | ||
def BLESSING(self) -> _Message: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def PRAYER_ANIMATED(self) -> List[_Message]: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def HURRAY_ANIMATED(self) -> List[_Message]: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def ERROR_COLORED(self) -> _Message: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def ERROR_ANIMATION(self) -> _Message: | ||
pass | ||
|
||
@property | ||
def quotes(self) -> 'Quotes': | ||
"""Importable messages for the OhMyGod""" | ||
return self.Quotes() | ||
|
||
class Quotes(ABC): | ||
@property | ||
@abstractmethod | ||
def BLESSING(self) -> Text: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def PRAYER(self) -> Text: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def HURRAY(self) -> Text: | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def ERROR(self) -> Text: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[tool.poetry] | ||
name = "ohmygod" | ||
version = "0.1.5" | ||
description = "Rich CLI tool powered by Buddha" | ||
version = "0.2.0" | ||
description = "Rich CLI tool powered by gods" | ||
authors = ["Sori Lim <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
|