mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:43:39 +02:00
pep8
This commit is contained in:
parent
a7bec029de
commit
ffc0b5af73
1 changed files with 3 additions and 7 deletions
|
|
@ -391,9 +391,7 @@ class FieldMetadata(dict):
|
|||
# }}}
|
||||
|
||||
# search labels that are not db columns
|
||||
search_items = [ 'all',
|
||||
'search',
|
||||
]
|
||||
search_items = ['all', 'search']
|
||||
|
||||
def __init__(self):
|
||||
self._field_metadata = copy.deepcopy(self._field_metadata_prototype)
|
||||
|
|
@ -434,12 +432,10 @@ def __iter__(self):
|
|||
yield key
|
||||
|
||||
def __contains__(self, key):
|
||||
return self.has_key(key)
|
||||
return key in self._tb_cats or key == 'title_sort'
|
||||
|
||||
def has_key(self, key):
|
||||
if key == 'title_sort':
|
||||
return True
|
||||
return key in self._tb_cats
|
||||
return key in self
|
||||
|
||||
def keys(self):
|
||||
return self._tb_cats.keys()
|
||||
|
|
|
|||
Loading…
Reference in a new issue