Use enumerate(start=1) instead of index += 1.
This commit is contained in:
parent
b99eecf8c5
commit
a73dbba387
1 changed files with 2 additions and 3 deletions
|
@ -1415,9 +1415,8 @@ def merge(
|
|||
index_length = len(str(len(input_filepaths)))
|
||||
rand_prefix = random_string(3, string.digits)
|
||||
|
||||
for (index, input_filepath) in enumerate(input_filepaths):
|
||||
# Number books from 1 for human sanity.
|
||||
index += 1
|
||||
# Number books from 1 for human sanity.
|
||||
for (index, input_filepath) in enumerate(input_filepaths, start=1):
|
||||
print(f'Merging {input_filepath.absolute_path}.')
|
||||
prefix = f'{rand_prefix}_{index:>0{index_length}}_{{}}'
|
||||
input_book = Epub.open(input_filepath)
|
||||
|
|
Loading…
Reference in a new issue