Some minor pylint improvements
This commit is contained in:
parent
e2a5fe8e12
commit
a75dca13c9
@ -23,22 +23,6 @@
|
||||
|
||||
"Find unused objects and remove with the user's permission."
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Set up logging
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import logging
|
||||
log = logging.getLogger(".RemoveUnused")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# gtk modules
|
||||
@ -62,6 +46,8 @@ from gramps.gen.updatecallback import UpdateCallback
|
||||
from gramps.gui.plug import tool
|
||||
from gramps.gui.glade import Glade
|
||||
from gramps.gen.filters import GenericFilterFactory, rules
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -242,7 +228,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
places=self.places_box.get_active(),
|
||||
media=self.media_box.get_active(),
|
||||
repos=self.repos_box.get_active(),
|
||||
notes = self.notes_box.get_active(),
|
||||
notes=elf.notes_box.get_active(),
|
||||
)
|
||||
|
||||
for item in self.sensitive_list:
|
||||
@ -364,8 +350,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
try:
|
||||
obj = self.tables[the_type]['get_func'](handle)
|
||||
editor_str = 'from gramps.gui.editors import %s as editor' % (
|
||||
self.tables[the_type]['editor']
|
||||
)
|
||||
self.tables[the_type]['editor'])
|
||||
exec(editor_str, globals())
|
||||
editor(self.dbstate, self.uistate, [], obj)
|
||||
except WindowActiveError:
|
||||
|
Loading…
Reference in New Issue
Block a user