mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
parenthesize chained operators (extra-edit)
This commit is contained in:
parent
76c091c975
commit
537ea5ef34
@ -67,8 +67,7 @@ def extract_book(pathtoebook, tdir, log=None, view_kepub=False, processed=False,
|
||||
if not only_input_plugin:
|
||||
# Run the HTML preprocess/parsing from the conversion pipeline as
|
||||
# well
|
||||
if (processed or (plumber.input_fmt.lower() in {'pdb', 'pdf', 'rb'} and
|
||||
not hasattr(pathtoopf, 'manifest'))):
|
||||
if processed or (plumber.input_fmt.lower() in {'pdb', 'pdf', 'rb'} and not hasattr(pathtoopf, 'manifest')):
|
||||
if hasattr(pathtoopf, 'manifest'):
|
||||
pathtoopf = write_oebbook(pathtoopf, tdir)
|
||||
pathtoopf = create_oebbook(log, pathtoopf, plumber.opts)
|
||||
|
@ -88,8 +88,7 @@ class RemoveFakeMargins:
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if ((hasattr(ti, 'startswith') and ti.startswith('-')) or
|
||||
(isinstance(ti, numbers.Number) and ti < 0)):
|
||||
if ((hasattr(ti, 'startswith') and ti.startswith('-')) or (isinstance(ti, numbers.Number) and ti < 0)):
|
||||
raise NegativeTextIndent()
|
||||
return style.marginLeft, style.marginRight, style
|
||||
return '', '', None
|
||||
|
@ -1233,12 +1233,13 @@ class TagsModel(QAbstractItemModel): # {{{
|
||||
fm_dest = self.db.metadata_for_field(node.category_key)
|
||||
if fm_dest['kind'] == 'user':
|
||||
fm_src = self.db.metadata_for_field(md.column_name)
|
||||
if md.column_name in ['authors', 'publisher', 'series'] or \
|
||||
((fm_src['is_custom'] and (
|
||||
if md.column_name in ['authors', 'publisher', 'series'] or (
|
||||
(fm_src['is_custom'] and (
|
||||
fm_src['datatype'] in ['series', 'text', 'enumeration'] and
|
||||
not fm_src['is_multiple']))or
|
||||
not fm_src['is_multiple'])) or
|
||||
(fm_src['datatype'] == 'composite' and
|
||||
fm_src['display'].get('make_category', False))):
|
||||
fm_src['display'].get('make_category', False))
|
||||
):
|
||||
mime = 'application/calibre+from_library'
|
||||
ids = list(map(int, md.data(mime).data().split()))
|
||||
self.handle_user_category_drop(node, ids, md.column_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user