Remove unneeded line continuations

svn: r16450
This commit is contained in:
Gerald Britton 2011-01-23 23:01:50 +00:00
parent 4e261e9bf8
commit 0b0913bac1

View File

@ -242,12 +242,12 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
if ref.ref not in handle_list] if ref.ref not in handle_list]
# If deleting removing the reference to the event # If deleting removing the reference to the event
# to which birth or death ref_index points, unset the index # to which birth or death ref_index points, unset the index
if (self.birth_ref_index != -1) \ if (self.birth_ref_index != -1
and (self.event_ref_list[self.birth_ref_index].ref and self.event_ref_list[self.birth_ref_index].ref
in handle_list): in handle_list):
self.set_birth_ref(None) self.set_birth_ref(None)
if (self.death_ref_index != -1) \ if (self.death_ref_index != -1
and (self.event_ref_list[self.death_ref_index].ref and self.event_ref_list[self.death_ref_index].ref
in handle_list): in handle_list):
self.set_death_ref(None) self.set_death_ref(None)
self.event_ref_list = new_list self.event_ref_list = new_list
@ -265,7 +265,7 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
new_list = [handle for handle in self.family_list new_list = [handle for handle in self.family_list
if handle not in handle_list] if handle not in handle_list]
self.family_list = new_list self.family_list = new_list
new_list = [ handle for handle in self.parent_family_list \ new_list = [handle for handle in self.parent_family_list
if handle not in handle_list] if handle not in handle_list]
self.parent_family_list = new_list self.parent_family_list = new_list
elif classname == 'Place': elif classname == 'Place':
@ -354,11 +354,17 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
""" """
check_list = self.lds_ord_list check_list = self.lds_ord_list
add_list = filter(None, check_list) add_list = filter(None, check_list)
return [self.primary_name] + self.media_list + \ return ([self.primary_name] +
self.alternate_names + self.address_list + \ self.media_list +
self.attribute_list + self.urls + \ self.alternate_names +
self.source_list + self.event_ref_list + add_list + \ self.address_list +
self.attribute_list +
self.urls +
self.source_list +
self.event_ref_list +
add_list +
self.person_ref_list self.person_ref_list
)
def get_sourcref_child_list(self): def get_sourcref_child_list(self):
""" """
@ -368,10 +374,15 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
refer sources. refer sources.
:rtype: list :rtype: list
""" """
return [self.primary_name] + self.media_list + \ return ([self.primary_name] +
self.alternate_names + self.address_list + \ self.media_list +
self.attribute_list + self.lds_ord_list + \ self.alternate_names +
self.person_ref_list + self.event_ref_list self.address_list +
self.attribute_list +
self.lds_ord_list +
self.person_ref_list +
self.event_ref_list
)
def get_note_child_list(self): def get_note_child_list(self):
""" """
@ -381,11 +392,16 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
refer notes. refer notes.
:rtype: list :rtype: list
""" """
return [self.primary_name] + self.media_list + \ return ([self.primary_name] +
self.alternate_names + self.address_list + \ self.media_list +
self.attribute_list + self.lds_ord_list + \ self.alternate_names +
self.person_ref_list + self.source_list + \ self.address_list +
self.attribute_list +
self.lds_ord_list +
self.person_ref_list +
self.source_list +
self.event_ref_list self.event_ref_list
)
def get_referenced_handles(self): def get_referenced_handles(self):
""" """
@ -396,9 +412,10 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
:rtype: list :rtype: list
""" """
return [('Family', handle) for handle in return [('Family', handle) for handle in
(self.family_list + self.parent_family_list)] \ (self.family_list + self.parent_family_list)] + (
+ self.get_referenced_note_handles() \ self.get_referenced_note_handles() +
+ self.get_referenced_tag_handles() self.get_referenced_tag_handles()
)
def get_handle_referents(self): def get_handle_referents(self):
""" """
@ -698,11 +715,11 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
break break
else: else:
self.event_ref_list.append(addendum) self.event_ref_list.append(addendum)
if self.birth_ref_index == -1 and \ if (self.birth_ref_index == -1 and
idx == acquisition.birth_ref_index: idx == acquisition.birth_ref_index):
self.birth_ref_index = len(self.event_ref_list) - 1 self.birth_ref_index = len(self.event_ref_list) - 1
if self.death_ref_index == -1 and \ if (self.death_ref_index == -1 and
idx == acquisition.death_ref_index: idx == acquisition.death_ref_index):
self.death_ref_index = len(self.event_ref_list) - 1 self.death_ref_index = len(self.event_ref_list) - 1
def add_family_handle(self, family_handle): def add_family_handle(self, family_handle):