def create_text_commands(view_id): view = sublime.View(view_id) cmds = [] for class_ in text_command_classes: cmds.append(class_(view)) return cmds