mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
fbea3b9b75
commit
6ca643ba22
@ -37,6 +37,7 @@ def single_text(x):
|
|||||||
x = x.strip()
|
x = x.strip()
|
||||||
return x if x else None
|
return x if x else None
|
||||||
|
|
||||||
|
|
||||||
series_index_pat = re.compile(r'(.*)\s+\[([.0-9]+)\]$')
|
series_index_pat = re.compile(r'(.*)\s+\[([.0-9]+)\]$')
|
||||||
|
|
||||||
|
|
||||||
@ -528,8 +529,7 @@ class Writer(object):
|
|||||||
elif field.is_many_many:
|
elif field.is_many_many:
|
||||||
self.set_books_func = many_many
|
self.set_books_func = many_many
|
||||||
elif field.is_many:
|
elif field.is_many:
|
||||||
self.set_books_func = (self.set_books_for_enum if dt ==
|
self.set_books_func = (self.set_books_for_enum if dt == 'enumeration' else many_one)
|
||||||
'enumeration' else many_one)
|
|
||||||
else:
|
else:
|
||||||
self.set_books_func = (one_one_in_books if field.metadata['table'] == 'books' else one_one_in_other)
|
self.set_books_func = (one_one_in_books if field.metadata['table'] == 'books' else one_one_in_other)
|
||||||
if self.name in {'timestamp', 'uuid', 'sort'}:
|
if self.name in {'timestamp', 'uuid', 'sort'}:
|
||||||
@ -552,5 +552,3 @@ class Writer(object):
|
|||||||
if not book_id_val_map:
|
if not book_id_val_map:
|
||||||
return set()
|
return set()
|
||||||
return many_one(book_id_val_map, db, field, False)
|
return many_one(book_id_val_map, db, field, False)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user