Put space before comma (PEP8) in preparation for

some bugfixes.
        * src/plugins/PatchNames.py


svn: r10517
This commit is contained in:
Kees Bakker 2008-04-07 19:27:52 +00:00
parent 7e910a6fc3
commit c0a8ae9aff

View File

@ -81,11 +81,7 @@ _sn_prefix_re = re.compile("^\s*(%s)\s+(.*)" % '|'.join(prefix_list),
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#
# PatchNames
#
#-------------------------------------------------------------------------
class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
def __init__(self, dbstate, uistate, options_class, name, callback=None):
@ -279,7 +275,7 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
GrampsDisplay.help()
def on_ok_clicked(self, obj):
self.trans = self.db.transaction_begin("",batch=True)
trans = self.db.transaction_begin("", batch=True)
self.db.disable_signals()
for grp in self.nick_list:
handle = self.nick_hash[grp[0]]
@ -293,7 +289,7 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
attr.set_type(gen.lib.AttributeType.NICKNAME)
attr.set_value(nick_name)
p.add_attribute(attr)
self.db.commit_person(p,self.trans)
self.db.commit_person(p, trans)
for grp in self.title_list:
handle = self.title_hash[grp[0]]
@ -303,7 +299,7 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
name = p.get_primary_name()
name.set_first_name(grp[2].strip())
name.set_title(grp[1].strip())
self.db.commit_person(p,self.trans)
self.db.commit_person(p, trans)
for grp in self.prefix1_list:
handle = self.prefix1_hash[grp[0]]
@ -313,7 +309,7 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
name = p.get_primary_name()
name.set_first_name(grp[1].strip())
name.set_surname_prefix(grp[2].strip())
self.db.commit_person(p,self.trans)
self.db.commit_person(p, trans)
for grp in self.prefix2_list:
handle = self.prefix2_hash[grp[0]]
@ -323,20 +319,16 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
name = p.get_primary_name()
name.set_surname(grp[1].strip())
name.set_surname_prefix(grp[2].strip())
self.db.commit_person(p,self.trans)
self.db.commit_person(p, trans)
self.db.transaction_commit(self.trans,
self.db.transaction_commit(trans,
_("Extract information from names"))
self.db.enable_signals()
self.db.request_rebuild()
self.close()
self.cb()
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
class PatchNamesOptions(Tool.ToolOptions):
"""
Defines options and provides handling interface.
@ -345,11 +337,7 @@ class PatchNamesOptions(Tool.ToolOptions):
def __init__(self, name, person_id=None):
Tool.ToolOptions.__init__(self, name, person_id)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
register_tool(
name = 'patchnames',
category = Tool.TOOL_DBPROC,