(self)
| 63 | parser.set_defaults(_command=PluginsCMD) |
| 64 | |
| 65 | def execute(self): |
| 66 | command = getattr(self.args, 'command', None) |
| 67 | if command == 'install': |
| 68 | plugins_manager.install_plugins( |
| 69 | list(self.args.package), |
| 70 | index_url=self.args.index_url, |
| 71 | force_update=self.args.force_update) |
| 72 | elif command == 'uninstall': |
| 73 | plugins_manager.uninstall_plugins( |
| 74 | list(self.args.package), is_yes=self.args.yes) |
| 75 | elif command == 'list': |
| 76 | plugins_manager.list_plugins(show_all=self.args.all) |
| 77 | else: |
| 78 | raise ValueError( |
| 79 | 'Usage: modelscope plugin {install|uninstall|list} ...') |
nothing calls this directly
no test coverage detected