fix: lint

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618 2024-01-27 22:28:38 +08:00
parent cb3779f279
commit bd46bc0c6c
3 changed files with 22 additions and 17 deletions

View File

@ -465,6 +465,7 @@ class EPUBBookLoader(BaseBookLoader):
all_items = list(self.origin_book.get_items())
trans_taglist = self.translate_tags.split(",")
all_p_length = sum(
(
0
if (
(i.get_type() != ITEM_DOCUMENT)
@ -475,9 +476,11 @@ class EPUBBookLoader(BaseBookLoader):
)
)
else len(bs(i.content, "html.parser").findAll(trans_taglist))
)
for i in all_items
)
all_p_length += self.allow_navigable_strings * sum(
(
0
if (
(i.get_type() != ITEM_DOCUMENT)
@ -488,6 +491,7 @@ class EPUBBookLoader(BaseBookLoader):
)
)
else len(bs(i.content, "html.parser").findAll(text=True))
)
for i in all_items
)
pbar = tqdm(total=self.test_num) if self.is_test else tqdm(total=all_p_length)

View File

@ -1,6 +1,7 @@
"""
inspired by: https://github.com/jesselau76/srt-gpt-translator, MIT License
"""
import re
import sys
from pathlib import Path

View File

@ -18,7 +18,7 @@ packages = [
setup(
name="bbook_maker",
description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.",
version="0.7.1",
version="0.7.2",
license="MIT",
author="yihong0618",
author_email="zouzou0208@gmail.com",