2022-02-25 20:03:36 +00:00
|
|
|
"""Module for creating menus"""
|
2024-03-22 07:19:13 +00:00
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from menu.menu import Menu
|
|
|
|
|
|
|
|
|
|
|
|
# pylint: disable=too-few-public-methods
|
|
|
|
class MenuBuilder(ABC):
|
|
|
|
"""Base class for menu builders"""
|
2022-11-30 05:19:17 +00:00
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def build(self, name: str, context_object=None) -> Menu:
|
|
|
|
"""builds a menu and gives it a name and a context object"""
|