def __init__(
        self,
        name: str,
        command: str | None = None,
        python: FunctionType | None = None,
        params: str = "",
        command_vars: list[CommandVar] | None = None,
        icon_path: str = None,
    ) -> None:
        """
        Do not specify both 'python' and 'command', either pass a python function or a command but not both.
        """
        self.name = name
        self.command = command
        self.isMenu = False
        self.python = python
        self.params = params
        self.command_vars = command_vars
        self.icon_path = icon_path

        if command != None and python != None:
            raise ValueError("both command and python cannot be defined")

        Do not specify both 'python' and 'command', either pass a python function or a command but not both.
        
context_menu/menus.py