increase pylint score

This commit is contained in:
Paul Franklin 2016-08-06 16:13:30 -07:00
parent 94f0c9ee90
commit 2e3a4fd55f

View File

@ -65,7 +65,7 @@ _ = glocale.translation.sgettext
from gramps.cli.grampscli import CLIManager from gramps.cli.grampscli import CLIManager
from .user import User from .user import User
from .plug import tool from .plug import tool
from gramps.gen.plug import (START, END) from gramps.gen.plug import START
from gramps.gen.plug import REPORT from gramps.gen.plug import REPORT
from gramps.gen.plug.report._constants import standalone_categories from gramps.gen.plug.report._constants import standalone_categories
from .plug import (PluginWindows, ReportPluginDialog, ToolPluginDialog) from .plug import (PluginWindows, ReportPluginDialog, ToolPluginDialog)
@ -87,7 +87,6 @@ from gramps.gen.utils.file import media_path_full
from .dbloader import DbLoader from .dbloader import DbLoader
from .display import display_help, display_url from .display import display_help, display_url
from .configure import GrampsPreferences from .configure import GrampsPreferences
from gramps.gen.db.exceptions import DbException
from .aboutdialog import GrampsAboutDialog from .aboutdialog import GrampsAboutDialog
from .navigator import Navigator from .navigator import Navigator
from .views.tags import Tags from .views.tags import Tags
@ -103,7 +102,7 @@ if is_quartz():
from gi.repository import GtkosxApplication as QuartzApp from gi.repository import GtkosxApplication as QuartzApp
_GTKOSXAPPLICATION = True _GTKOSXAPPLICATION = True
except: except:
print ("Failed to import gtk_osxapplication") print("Failed to import gtk_osxapplication")
_GTKOSXAPPLICATION = False _GTKOSXAPPLICATION = False
else: else:
_GTKOSXAPPLICATION = False _GTKOSXAPPLICATION = False
@ -264,7 +263,7 @@ class ViewManager(CLIManager):
""" """
def __init__(self, dbstate, view_category_order, user = None): def __init__(self, dbstate, view_category_order, user=None):
""" """
The viewmanager is initialised with a dbstate on which GRAMPS is The viewmanager is initialised with a dbstate on which GRAMPS is
working, and a fixed view_category_order, which is the order in which working, and a fixed view_category_order, which is the order in which
@ -320,9 +319,9 @@ class ViewManager(CLIManager):
howoften = config.get("behavior.check-for-updates") howoften = config.get("behavior.check-for-updates")
update = False update = False
if howoften != 0: # update never if zero if howoften != 0: # update never if zero
y,m,d = list(map(int, year, mon, day = list(map(
config.get("behavior.last-check-for-updates").split("/"))) int, config.get("behavior.last-check-for-updates").split("/")))
days = (datetime.date.today() - datetime.date(y, m, d)).days days = (datetime.date.today() - datetime.date(year, mon, day)).days
if howoften == 1 and days >= 30: # once a month if howoften == 1 and days >= 30: # once a month
update = True update = True
elif howoften == 2 and days >= 7: # once a week elif howoften == 2 and days >= 7: # once a week
@ -524,16 +523,26 @@ class ViewManager(CLIManager):
('F8', None, 'F9', "F8", None, self.__keypress), ('F8', None, 'F9', "F8", None, self.__keypress),
('F9', None, 'F9', "F9", None, self.__keypress), ('F9', None, 'F9', "F9", None, self.__keypress),
('F11', None, 'F11', "F11", None, self.__keypress), ('F11', None, 'F11', "F11", None, self.__keypress),
('<PRIMARY>1', None, '<PRIMARY>1', "<PRIMARY>1", None, self.__gocat), ('<PRIMARY>1', None, '<PRIMARY>1', "<PRIMARY>1", None,
('<PRIMARY>2', None, '<PRIMARY>2', "<PRIMARY>2", None, self.__gocat), self.__gocat),
('<PRIMARY>3', None, '<PRIMARY>3', "<PRIMARY>3", None, self.__gocat), ('<PRIMARY>2', None, '<PRIMARY>2', "<PRIMARY>2", None,
('<PRIMARY>4', None, '<PRIMARY>4', "<PRIMARY>4", None, self.__gocat), self.__gocat),
('<PRIMARY>5', None, '<PRIMARY>5', "<PRIMARY>5", None, self.__gocat), ('<PRIMARY>3', None, '<PRIMARY>3', "<PRIMARY>3", None,
('<PRIMARY>6', None, '<PRIMARY>6', "<PRIMARY>6", None, self.__gocat), self.__gocat),
('<PRIMARY>7', None, '<PRIMARY>7', "<PRIMARY>7", None, self.__gocat), ('<PRIMARY>4', None, '<PRIMARY>4', "<PRIMARY>4", None,
('<PRIMARY>8', None, '<PRIMARY>8', "<PRIMARY>8", None, self.__gocat), self.__gocat),
('<PRIMARY>9', None, '<PRIMARY>9', "<PRIMARY>9", None, self.__gocat), ('<PRIMARY>5', None, '<PRIMARY>5', "<PRIMARY>5", None,
('<PRIMARY>0', None, '<PRIMARY>0', "<PRIMARY>0", None, self.__gocat), self.__gocat),
('<PRIMARY>6', None, '<PRIMARY>6', "<PRIMARY>6", None,
self.__gocat),
('<PRIMARY>7', None, '<PRIMARY>7', "<PRIMARY>7", None,
self.__gocat),
('<PRIMARY>8', None, '<PRIMARY>8', "<PRIMARY>8", None,
self.__gocat),
('<PRIMARY>9', None, '<PRIMARY>9', "<PRIMARY>9", None,
self.__gocat),
('<PRIMARY>0', None, '<PRIMARY>0', "<PRIMARY>0", None,
self.__gocat),
# NOTE: CTRL+ALT+NUMBER is set in src/plugins/sidebar/cat...py # NOTE: CTRL+ALT+NUMBER is set in src/plugins/sidebar/cat...py
('<PRIMARY>BackSpace', None, '<PRIMARY>BackSpace', ('<PRIMARY>BackSpace', None, '<PRIMARY>BackSpace',
"<PRIMARY>BackSpace", None, self.__keypress), "<PRIMARY>BackSpace", None, self.__keypress),
@ -566,9 +575,9 @@ class ViewManager(CLIManager):
self._file_toggle_action_list = [ self._file_toggle_action_list = [
('Navigator', None, _('_Navigator'), "<PRIMARY>m", None, ('Navigator', None, _('_Navigator'), "<PRIMARY>m", None,
self.navigator_toggle, self.show_navigator ), self.navigator_toggle, self.show_navigator),
('Toolbar', None, _('_Toolbar'), None, None, self.toolbar_toggle, ('Toolbar', None, _('_Toolbar'), None, None, self.toolbar_toggle,
self.show_toolbar ), self.show_toolbar),
('Fullscreen', None, _('F_ull Screen'), "F11", None, ('Fullscreen', None, _('F_ull Screen'), "F11", None,
self.fullscreen_toggle, self.fullscreen), self.fullscreen_toggle, self.fullscreen),
] ]
@ -626,8 +635,8 @@ class ViewManager(CLIManager):
def __next_view(self, action): def __next_view(self, action):
""" """
Callback that is called when the next category action is selected. Callback that is called when the next category action is selected. It
It selects the next category as the active category. If we reach the end, selects the next category as the active category. If we reach the end,
we wrap around to the first. we wrap around to the first.
""" """
curpage = self.notebook.get_current_page() curpage = self.notebook.get_current_page()
@ -645,8 +654,8 @@ class ViewManager(CLIManager):
def __prev_view(self, action): def __prev_view(self, action):
""" """
Callback that is called when the previous category action is selected. Callback that is called when the previous category action is selected.
It selects the previous category as the active category. If we reach the It selects the previous category as the active category. If we reach
beginning of the list, we wrap around to the last. the beginning of the list, we wrap around to the last.
""" """
curpage = self.notebook.get_current_page() curpage = self.notebook.get_current_page()
#find cat and view of the current page #find cat and view of the current page
@ -677,7 +686,7 @@ class ViewManager(CLIManager):
self.__build_tools_menu(self._pmgr.get_reg_tools()) self.__build_tools_menu(self._pmgr.get_reg_tools())
self.__build_report_menu(self._pmgr.get_reg_reports()) self.__build_report_menu(self._pmgr.get_reg_reports())
self._pmgr.connect('plugins-reloaded', self._pmgr.connect('plugins-reloaded',
self.__rebuild_report_and_tool_menus) self.__rebuild_report_and_tool_menus)
self.fileactions.set_sensitive(True) self.fileactions.set_sensitive(True)
self.uistate.widget.set_sensitive(True) self.uistate.widget.set_sensitive(True)
if not self.file_loaded: if not self.file_loaded:
@ -832,12 +841,16 @@ class ViewManager(CLIManager):
self.uimanager.ensure_update() self.uimanager.ensure_update()
def __attach_menubar(self, vbox): def __attach_menubar(self, vbox):
"""
Attach the menubar
"""
vbox.pack_start(self.menubar, False, True, 0) vbox.pack_start(self.menubar, False, True, 0)
if _GTKOSXAPPLICATION: if _GTKOSXAPPLICATION:
self.menubar.hide() self.menubar.hide()
quit_item = self.uimanager.get_widget("/MenuBar/FileMenu/Quit") quit_item = self.uimanager.get_widget("/MenuBar/FileMenu/Quit")
about_item = self.uimanager.get_widget("/MenuBar/HelpMenu/About") about_item = self.uimanager.get_widget("/MenuBar/HelpMenu/About")
prefs_item = self.uimanager.get_widget("/MenuBar/EditMenu/Preferences") prefs_item = self.uimanager.get_widget(
"/MenuBar/EditMenu/Preferences")
self.macapp.set_menu_bar(self.menubar) self.macapp.set_menu_bar(self.menubar)
self.macapp.insert_app_menu_item(about_item, 0) self.macapp.insert_app_menu_item(about_item, 0)
self.macapp.insert_app_menu_item(prefs_item, 1) self.macapp.insert_app_menu_item(prefs_item, 1)
@ -943,9 +956,10 @@ class ViewManager(CLIManager):
return None return None
def __create_dummy_page(self, pdata, error): def __create_dummy_page(self, pdata, error):
""" Create a dummy page """
from .views.pageview import DummyPage from .views.pageview import DummyPage
return DummyPage(pdata.name, pdata, self.dbstate, self.uistate, return DummyPage(pdata.name, pdata, self.dbstate, self.uistate,
_("View failed to load. Check error output."), error) _("View failed to load. Check error output."), error)
def __create_page(self, pdata, page_def): def __create_page(self, pdata, page_def):
""" """
@ -955,7 +969,7 @@ class ViewManager(CLIManager):
page = page_def(pdata, self.dbstate, self.uistate) page = page_def(pdata, self.dbstate, self.uistate)
except: except:
import traceback import traceback
LOG.warning("View '%s' failed to load." % pdata.id) LOG.warning("View '%s' failed to load.", pdata.id)
traceback.print_exc() traceback.print_exc()
page = self.__create_dummy_page(pdata, traceback.format_exc()) page = self.__create_dummy_page(pdata, traceback.format_exc())
@ -1122,12 +1136,13 @@ class ViewManager(CLIManager):
delim = old_title.find(' - ') delim = old_title.find(' - ')
tit1 = old_title[:delim] tit1 = old_title[:delim]
tit2 = old_title[delim:] tit2 = old_title[delim:]
new_title = dialog.after_change
if '<=' in tit2: if '<=' in tit2:
delim2 = tit2.find('<=') + 3 ## delim2 = tit2.find('<=') + 3
tit3 = tit2[delim2:-1] ## tit3 = tit2[delim2:-1]
new_title = dialog.after_change + tit2.replace(']', '') + ' => ' + tit1 + ']' new_title += tit2.replace(']', '') + ' => ' + tit1 + ']'
else: else:
new_title = dialog.after_change + tit2 + ' <= [' + tit1 + ']' new_title += tit2 + ' <= [' + tit1 + ']'
self.uistate.window.set_title(new_title) self.uistate.window.set_title(new_title)
def __post_load(self): def __post_load(self):
@ -1163,7 +1178,7 @@ class ViewManager(CLIManager):
name = title name = title
if self.dbstate.db.readonly: if self.dbstate.db.readonly:
msg = "%s (%s) - Gramps" % (name, _('Read Only')) msg = "%s (%s) - Gramps" % (name, _('Read Only'))
self.uistate.window.set_title(msg) self.uistate.window.set_title(msg)
self.actiongroup.set_sensitive(False) self.actiongroup.set_sensitive(False)
else: else:
@ -1292,7 +1307,8 @@ class ViewManager(CLIManager):
file_entry = Gtk.Entry() file_entry = Gtk.Entry()
button = Gtk.Button() button = Gtk.Button()
button.connect("clicked", button.connect("clicked",
lambda widget: self.select_backup_path(widget, path_entry)) lambda widget:
self.select_backup_path(widget, path_entry))
image = Gtk.Image() image = Gtk.Image()
image.set_from_icon_name('document-open', Gtk.IconSize.BUTTON) image.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
image.show() image.show()
@ -1306,30 +1322,30 @@ class ViewManager(CLIManager):
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
hbox.pack_start(label, False, True, 0) hbox.pack_start(label, False, True, 0)
struct_time = time.localtime() struct_time = time.localtime()
file_entry.set_text(config.get('paths.quick-backup-filename') % file_entry.set_text(
{"filename": self.dbstate.db.get_dbname(), config.get('paths.quick-backup-filename'
"year": struct_time.tm_year, ) % {"filename": self.dbstate.db.get_dbname(),
"month": struct_time.tm_mon, "year": struct_time.tm_year,
"day": struct_time.tm_mday, "month": struct_time.tm_mon,
"hour": struct_time.tm_hour, "day": struct_time.tm_mday,
"minutes": struct_time.tm_min, "hour": struct_time.tm_hour,
"seconds": struct_time.tm_sec, "minutes": struct_time.tm_min,
"extension": "gpkg", "seconds": struct_time.tm_sec,
}) "extension": "gpkg"})
hbox.pack_end(file_entry, True, True, 0) hbox.pack_end(file_entry, True, True, 0)
vbox.pack_start(hbox, False, True, 0) vbox.pack_start(hbox, False, True, 0)
hbox = Gtk.Box() hbox = Gtk.Box()
bytes = 0 fbytes = 0
mbytes = "0" mbytes = "0"
for media in self.dbstate.db.iter_media(): for media in self.dbstate.db.iter_media():
fullname = media_path_full(self.dbstate.db, media.get_path()) fullname = media_path_full(self.dbstate.db, media.get_path())
try: try:
bytes += posixpath.getsize(fullname) fbytes += posixpath.getsize(fullname)
length = len(str(bytes)) length = len(str(fbytes))
if bytes <= 999999: if fbytes <= 999999:
mbytes = "< 1" mbytes = "< 1"
else: else:
mbytes = str(bytes)[:(length-6)] mbytes = str(fbytes)[:(length-6)]
except OSError: except OSError:
pass pass
label = Gtk.Label(label=_("Media:")) label = Gtk.Label(label=_("Media:"))
@ -1340,26 +1356,28 @@ class ViewManager(CLIManager):
include = Gtk.RadioButton.new_with_mnemonic_from_widget( include = Gtk.RadioButton.new_with_mnemonic_from_widget(
None, "%s (%s %s)" % (_("Include"), None, "%s (%s %s)" % (_("Include"),
mbytes, _("Megabyte|MB"))) mbytes, _("Megabyte|MB")))
exclude = Gtk.RadioButton.new_with_mnemonic_from_widget(include, _("Exclude")) exclude = Gtk.RadioButton.new_with_mnemonic_from_widget(include,
include.connect("toggled", lambda widget: self.media_toggle(widget, file_entry)) _("Exclude"))
include.connect("toggled", lambda widget: self.media_toggle(widget,
file_entry))
hbox.pack_start(include, False, True, 0) hbox.pack_start(include, False, True, 0)
hbox.pack_end(exclude, False, True, 0) hbox.pack_end(exclude, False, True, 0)
vbox.pack_start(hbox, False, True, 0) vbox.pack_start(hbox, False, True, 0)
window.show_all() window.show_all()
d = window.run() dbackup = window.run()
window.hide() window.hide()
if d == Gtk.ResponseType.APPLY: if dbackup == Gtk.ResponseType.APPLY:
# if file exists, ask if overwrite; else abort # if file exists, ask if overwrite; else abort
basefile = file_entry.get_text() basefile = file_entry.get_text()
basefile = basefile.replace("/", r"-") basefile = basefile.replace("/", r"-")
filename = os.path.join(path_entry.get_text(), basefile) filename = os.path.join(path_entry.get_text(), basefile)
if os.path.exists(filename): if os.path.exists(filename):
question = QuestionDialog2( # parent-OK question = QuestionDialog2( # parent-OK
_("Backup file already exists! Overwrite?"), _("Backup file already exists! Overwrite?"),
_("The file '%s' exists.") % filename, _("The file '%s' exists.") % filename,
_("Proceed and overwrite"), _("Proceed and overwrite"),
_("Cancel the backup"), _("Cancel the backup"),
parent=self.window) parent=self.window)
yes_no = question.run() yes_no = question.run()
if not yes_no: if not yes_no:
return return
@ -1378,7 +1396,8 @@ class ViewManager(CLIManager):
writer.write(filename) writer.write(filename)
self.uistate.set_busy_cursor(False) self.uistate.set_busy_cursor(False)
self.uistate.progress.hide() self.uistate.progress.hide()
self.uistate.push_message(self.dbstate, _("Backup saved to '%s'") % filename) self.uistate.push_message(self.dbstate,
_("Backup saved to '%s'") % filename)
config.set('paths.quick-backup-directory', path_entry.get_text()) config.set('paths.quick-backup-directory', path_entry.get_text())
else: else:
self.uistate.push_message(self.dbstate, _("Backup aborted")) self.uistate.push_message(self.dbstate, _("Backup aborted"))
@ -1389,7 +1408,7 @@ class ViewManager(CLIManager):
Choose a backup folder. Make sure there is one highlighted in Choose a backup folder. Make sure there is one highlighted in
right pane, otherwise FileChooserDialog will hang. right pane, otherwise FileChooserDialog will hang.
""" """
f = Gtk.FileChooserDialog( fdialog = Gtk.FileChooserDialog(
title=_("Select backup directory"), title=_("Select backup directory"),
parent=self.window, parent=self.window,
action=Gtk.FileChooserAction.SELECT_FOLDER, action=Gtk.FileChooserAction.SELECT_FOLDER,
@ -1400,14 +1419,14 @@ class ViewManager(CLIManager):
mpath = path_entry.get_text() mpath = path_entry.get_text()
if not mpath: if not mpath:
mpath = HOME_DIR mpath = HOME_DIR
f.set_current_folder(os.path.dirname(mpath)) fdialog.set_current_folder(os.path.dirname(mpath))
f.set_filename(os.path.join(mpath, ".")) fdialog.set_filename(os.path.join(mpath, "."))
status = f.run() status = fdialog.run()
if status == Gtk.ResponseType.OK: if status == Gtk.ResponseType.OK:
filename = f.get_filename() filename = fdialog.get_filename()
if filename: if filename:
path_entry.set_text(filename) path_entry.set_text(filename)
f.destroy() fdialog.destroy()
return True return True
def media_toggle(self, widget, file_entry): def media_toggle(self, widget, file_entry):
@ -1525,11 +1544,11 @@ class ViewManager(CLIManager):
self.uistate.uimanager.remove_action_group(self.reportactions) self.uistate.uimanager.remove_action_group(self.reportactions)
self.uistate.uimanager.remove_ui(self.report_menu_ui_id) self.uistate.uimanager.remove_ui(self.report_menu_ui_id)
self.reportactions = Gtk.ActionGroup(name='ReportWindow') self.reportactions = Gtk.ActionGroup(name='ReportWindow')
(uidef, actions) = self.build_plugin_menu( (udef, actions) = self.build_plugin_menu(
'ReportsMenu', report_menu_list, standalone_categories, 'ReportsMenu', report_menu_list, standalone_categories,
make_plugin_callback) make_plugin_callback)
self.reportactions.add_actions(actions) self.reportactions.add_actions(actions)
self.report_menu_ui_id = self.uistate.uimanager.add_ui_from_string(uidef) self.report_menu_ui_id = self.uistate.uimanager.add_ui_from_string(udef)
self.uimanager.insert_action_group(self.reportactions, 1) self.uimanager.insert_action_group(self.reportactions, 1)
self.uistate.uimanager.ensure_update() self.uistate.uimanager.ensure_update()
@ -1554,8 +1573,7 @@ class ViewManager(CLIManager):
hash_data[category].append(pdata) hash_data[category].append(pdata)
# Sort categories, skipping the unsupported # Sort categories, skipping the unsupported
catlist = sorted(item for item in hash_data catlist = sorted(item for item in hash_data if item != _UNSUPPORTED)
if item != _UNSUPPORTED)
for key in catlist: for key in catlist:
new_key = key[0].replace(' ', '-') new_key = key[0].replace(' ', '-')
@ -1625,9 +1643,9 @@ class ViewManager(CLIManager):
'again, you can hide it by using the Plugin Manager ' 'again, you can hide it by using the Plugin Manager '
'on the Help menu.' 'on the Help menu.'
) % {'name': pdata.name, ) % {'name': pdata.name,
'gramps_bugtracker_url' : URL_BUGHOME, 'gramps_bugtracker_url': URL_BUGHOME,
'firstauthoremail' : pdata.authors_email[0] 'firstauthoremail': pdata.authors_email[0]
if pdata.authors_email else '...', if pdata.authors_email else '...',
'error_msg': lasterror}, 'error_msg': lasterror},
parent=self.uistate.window) parent=self.uistate.window)
continue continue
@ -1635,19 +1653,19 @@ class ViewManager(CLIManager):
# pdata.category is (string, trans-string): # pdata.category is (string, trans-string):
if pdata.order == START: if pdata.order == START:
viewstoshow[pdata.category[0]].insert(0, (pdata, viewclass) ) viewstoshow[pdata.category[0]].insert(0, (pdata, viewclass))
else: else:
viewstoshow[pdata.category[0]].append( (pdata, viewclass) ) viewstoshow[pdata.category[0]].append((pdata, viewclass))
# First, get those in order defined, if exists: # First, get those in order defined, if exists:
resultorder = [viewstoshow[cat] resultorder = [viewstoshow[cat]
for cat in config.get("interface.view-categories") for cat in config.get("interface.view-categories")
if cat in viewstoshow] if cat in viewstoshow]
# Next, get the rest in some order: # Next, get the rest in some order:
resultorder.extend(viewstoshow[cat] resultorder.extend(viewstoshow[cat]
for cat in sorted(viewstoshow.keys()) for cat in sorted(viewstoshow.keys())
if viewstoshow[cat] not in resultorder) if viewstoshow[cat] not in resultorder)
return resultorder return resultorder
def key_bindings(obj): def key_bindings(obj):
@ -1716,12 +1734,12 @@ def run_plugin(pdata, dbstate, uistate):
'the plugin author (%(firstauthoremail)s).\n\n' 'the plugin author (%(firstauthoremail)s).\n\n'
'If you do not want Gramps to try and load this plugin again, ' 'If you do not want Gramps to try and load this plugin again, '
'you can hide it by using the Plugin Manager on the ' 'you can hide it by using the Plugin Manager on the '
'Help menu.') % { 'Help menu.') % {'name' : pdata.name,
'name': pdata.name, 'gramps_bugtracker_url' : URL_BUGHOME,
'gramps_bugtracker_url' : URL_BUGHOME, 'firstauthoremail' : pdata.authors_email[0]
'firstauthoremail': pdata.authors_email[0] if if pdata.authors_email
pdata.authors_email else '...', else '...',
'error_msg': error_msg}, 'error_msg' : error_msg},
parent=uistate.window) parent=uistate.window)
return return
@ -1730,16 +1748,15 @@ def run_plugin(pdata, dbstate, uistate):
getattr(mod, pdata.reportclass), getattr(mod, pdata.reportclass),
getattr(mod, pdata.optionclass), getattr(mod, pdata.optionclass),
pdata.name, pdata.id, pdata.name, pdata.id,
pdata.category, pdata.require_active, pdata.category, pdata.require_active)
)
else: else:
tool.gui_tool(dbstate = dbstate, user = User(uistate = uistate), tool.gui_tool(dbstate=dbstate, user=User(uistate=uistate),
tool_class = getattr(mod, pdata.toolclass), tool_class=getattr(mod, pdata.toolclass),
options_class = getattr(mod, pdata.optionclass), options_class=getattr(mod, pdata.optionclass),
translated_name = pdata.name, translated_name=pdata.name,
name = pdata.id, name=pdata.id,
category = pdata.category, category=pdata.category,
callback = dbstate.db.request_rebuild) callback=dbstate.db.request_rebuild)
def make_plugin_callback(pdata, dbstate, uistate): def make_plugin_callback(pdata, dbstate, uistate):
""" """