Plugins.Py
None
!! class
Plugins class
Plugins source
class Plugins: def __init__(self, markata: "Markata") -> None: self.m = markata def __rich__(self) -> Panel: grid = Table.grid(expand=True) num_plugins = f"[bright_blue]({len(self.m._pm.get_plugins())})[/]" for plugin in self.m._pm.get_plugins(): grid.add_row( "".join( [ "[bright_black]", ".".join(plugin.__name__.split(".")[:-1]), ".[/]", plugin.__name__.split(".")[-1], ], ), ) return Panel( grid, title=f"plugins {num_plugins}", border_style="gold1", expand=False, )
!! function
configure function
configure source
def configure(markata: "Markata") -> None: def get_plugins(self): try: return self._plugins except AttributeError: self._plugins: Plugins = Plugins(self) return self._plugins from markata import Markata Markata.plugins = property(get_plugins)
!! method
init method
init source
def __init__(self, markata: "Markata") -> None: self.m = markata
!! method
rich method
rich source
def __rich__(self) -> Panel: grid = Table.grid(expand=True) num_plugins = f"[bright_blue]({len(self.m._pm.get_plugins())})[/]" for plugin in self.m._pm.get_plugins(): grid.add_row( "".join( [ "[bright_black]", ".".join(plugin.__name__.split(".")[:-1]), ".[/]", plugin.__name__.split(".")[-1], ], ), ) return Panel( grid, title=f"plugins {num_plugins}", border_style="gold1", expand=False, )
!! function
get_plugins function
get_plugins source
def get_plugins(self): try: return self._plugins except AttributeError: self._plugins: Plugins = Plugins(self) return self._plugins