Remove unneeded line continuations
svn: r16450
This commit is contained in:
parent
4e261e9bf8
commit
0b0913bac1
@ -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
|
||||||
@ -259,14 +259,14 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
|
|||||||
self.set_death_ref(death_ref)
|
self.set_death_ref(death_ref)
|
||||||
elif classname == 'Person':
|
elif classname == 'Person':
|
||||||
new_list = [ref for ref in self.person_ref_list
|
new_list = [ref for ref in self.person_ref_list
|
||||||
if ref.ref not in handle_list]
|
if ref.ref not in handle_list]
|
||||||
self.person_ref_list = new_list
|
self.person_ref_list = new_list
|
||||||
elif classname == 'Family':
|
elif classname == 'Family':
|
||||||
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':
|
||||||
for ordinance in self.lds_ord_list:
|
for ordinance in self.lds_ord_list:
|
||||||
@ -275,7 +275,7 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
|
|||||||
|
|
||||||
def _replace_handle_reference(self, classname, old_handle, new_handle):
|
def _replace_handle_reference(self, classname, old_handle, new_handle):
|
||||||
if classname == 'Event':
|
if classname == 'Event':
|
||||||
refs_list = [ ref.ref for ref in self.event_ref_list ]
|
refs_list = [ref.ref for ref in self.event_ref_list]
|
||||||
new_ref = None
|
new_ref = None
|
||||||
if new_handle in refs_list:
|
if new_handle in refs_list:
|
||||||
new_ref = self.event_ref_list[refs_list.index(new_handle)]
|
new_ref = self.event_ref_list[refs_list.index(new_handle)]
|
||||||
@ -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.person_ref_list
|
self.attribute_list +
|
||||||
|
self.urls +
|
||||||
|
self.source_list +
|
||||||
|
self.event_ref_list +
|
||||||
|
add_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.event_ref_list
|
self.attribute_list +
|
||||||
|
self.lds_ord_list +
|
||||||
|
self.person_ref_list +
|
||||||
|
self.source_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):
|
||||||
|
Loading…
Reference in New Issue
Block a user