重构__create_web_img_list函数

This commit is contained in:
vincent 2023-08-20 12:48:56 +08:00
parent eb286c0a0e
commit 5bb20f59b3

View File

@ -27,11 +27,7 @@ class ImgManager:
self.img_list = self.__create_web_img_list()
def __create_web_img_list(self):
img_list = []
for url in self.img_url_list:
img = WebImg(self.task_name, url)
img_list.append(img)
return img_list
return [WebImg(self.task_name, url) for url in self.img_url_list]
def batch_fill_image_data(self):
with ThreadPoolExecutor() as executor: