mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use python 3.7 compatible syntax.
The := operator was introduced in python 3.8. I don't think making calibre incompatible with previous python versions is worth the use of the new operator here. FreeBSD at least uses python 3.7 by default and this would cause problems in providing calibre to users, and require them to custom compile software to get it.
This commit is contained in:
parent
986408809c
commit
fc9a480cd4
@ -782,8 +782,9 @@ class TagsView(QTreeView): # {{{
|
||||
partial(self.context_menu_handler, action='search',
|
||||
search_state=TAG_SEARCH_STATES['mark_plus'],
|
||||
index=index))
|
||||
if add_child_search := (tag.is_hierarchical == '5state' and
|
||||
len(tag_item.children)):
|
||||
add_child_search = (tag.is_hierarchical == '5state' and
|
||||
len(tag_item.children))
|
||||
if add_child_search:
|
||||
search_submenu.addAction(self.search_icon,
|
||||
_('Search for %s and its children')%display_name(tag),
|
||||
partial(self.context_menu_handler, action='search',
|
||||
|
Loading…
x
Reference in New Issue
Block a user