def _do_tag(self): b = BaseInput(self.tag_path) print("删除所有标签") Tag.delete_all() def callback(info): items = info.pop('items', []) items = items or [] info.update({'items': items}) tag = Tag(**info) tag.save() print(info.get('name', '')) b.input(callback)