# Path: cardinal/decorators.py
# def command(triggers):
#     if isinstance(triggers, str):
#         triggers = [triggers]
# 
#     if not isinstance(triggers, list):
#         raise TypeError("Command must be a trigger string or list of triggers")
# 
#     def wrap(f):
#         f.commands = triggers
#         return f
# 
#     return wrap
# 
# def regex(expression):
#     if (not isinstance(expression, str) and
#             not isinstance(expression, _RETYPE)):
#         raise TypeError("Regular expression must be a string or regex type")
# 
#     def wrap(f):
#         f.regex = expression
#         return f
# 
#     return wrap


from cardinal.decorators import command, regex


class TestCommandsPlugin:
    def __init__(self):
        self.command1_calls = []
        self.command2_calls = []
        self.regex_command_calls = []

    @command(['command1', 'command1_alias'])
    def command1(self, *args):
        self.command1_calls.append(args)


# Path: cardinal/decorators.py
# def command(triggers):
#     if isinstance(triggers, str):
#         triggers = [triggers]
# 
#     if not isinstance(triggers, list):
#         raise TypeError("Command must be a trigger string or list of triggers")
# 
#     def wrap(f):
#         f.commands = triggers
#         return f
# 
#     return wrap
# 
# def regex(expression):
#     if (not isinstance(expression, str) and
#             not isinstance(expression, _RETYPE)):
#         raise TypeError("Regular expression must be a string or regex type")
# 
#     def wrap(f):
#         f.regex = expression
#         return f
# 
#     return wrap


# Path: cardinal/fixtures/fake_plugins/commands/plugin.py
from cardinal.decorators import command, regex



class TestCommandsPlugin:
    def __init__(self):
        self.command1_calls = []
        self.command2_calls = []
        self.regex_command_calls = []

    @command(['command1', 'command1_alias'])
    def command1(self, *args):
        self.command1_calls.append(args)


    @command('command2')