pylint fixes
svn: r6287
This commit is contained in:
parent
d3cefa135e
commit
efd203c6b5
@ -331,17 +331,9 @@ class Person(PrimaryObject,SourceNote,
|
||||
return self.get_sourcref_child_list() + self.source_list \
|
||||
+ self.event_ref_list + birth_death
|
||||
|
||||
def set_complete_flag(self,val):
|
||||
warn( "Use set_marker instead of set_complete_flag", DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
if val:
|
||||
self.marker = (PrimaryObject.MARKER_COMPLETE, "")
|
||||
else:
|
||||
self.marker = (PrimaryObject.MARKER_NONE, "")
|
||||
|
||||
def get_complete_flag(self):
|
||||
warn( "Use get_marker instead of get_complete_flag", DeprecationWarning, 2)
|
||||
warn( "Use get_marker instead of get_complete_flag",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
return self.marker[0] == PrimaryObject.MARKER_COMPLETE
|
||||
@ -435,7 +427,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
return self.gender
|
||||
|
||||
def set_birth_handle(self, event_handle):
|
||||
warn( "Use set_birth_ref instead of set_birth_handle", DeprecationWarning, 2)
|
||||
warn( "Use set_birth_ref instead of set_birth_handle",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
event_ref = EventRef()
|
||||
@ -458,7 +451,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
self.birth_ref = event_ref
|
||||
|
||||
def set_death_handle(self, event_handle):
|
||||
warn( "Use set_death_ref instead of set_death_handle", DeprecationWarning, 2)
|
||||
warn( "Use set_death_ref instead of set_death_handle",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
event_ref = EventRef()
|
||||
@ -480,15 +474,6 @@ class Person(PrimaryObject,SourceNote,
|
||||
raise ValueError("Expecting EventRef instance")
|
||||
self.death_ref = event_ref
|
||||
|
||||
# def get_birth_handle(self):
|
||||
# warn( "Use get_birth_ref instead of get_birth_handle", DeprecationWarning, 2)
|
||||
# # Wrapper for old API
|
||||
# # remove when transitition done.
|
||||
# event_ref = self.get_birth_ref()
|
||||
# if event_ref:
|
||||
# return event_ref.get_reference_handle()
|
||||
# return ""
|
||||
|
||||
def get_birth_ref(self):
|
||||
"""
|
||||
Returns the L{EventRef} for Person's birth event. This
|
||||
@ -500,15 +485,6 @@ class Person(PrimaryObject,SourceNote,
|
||||
"""
|
||||
return self.birth_ref
|
||||
|
||||
# def get_death_handle(self):
|
||||
# warn( "Use get_death_ref instead of get_death_handle", DeprecationWarning, 2)
|
||||
# # Wrapper for old API
|
||||
# # remove when transitition done.
|
||||
# event_ref = self.get_death_ref()
|
||||
# if event_ref:
|
||||
# return event_ref.get_reference_handle()
|
||||
# return ""
|
||||
|
||||
def get_death_ref(self):
|
||||
"""
|
||||
Returns the L{EventRef} for the Person's death event. This
|
||||
@ -521,7 +497,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
return self.death_ref
|
||||
|
||||
def add_event_handle(self, event_handle):
|
||||
warn( "Use add_event_ref instead of add_event_handle", DeprecationWarning, 2)
|
||||
warn( "Use add_event_ref instead of add_event_handle",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
event_ref = EventRef()
|
||||
@ -544,7 +521,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
self.event_ref_list.append(event_ref)
|
||||
|
||||
def get_event_list(self):
|
||||
warn( "Use get_event_ref_list instead of get_event_list", DeprecationWarning, 2)
|
||||
warn( "Use get_event_ref_list instead of get_event_list",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
event_handle_list = []
|
||||
@ -564,7 +542,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
return self.event_ref_list
|
||||
|
||||
def set_event_list(self, event_list):
|
||||
warn( "Use set_event_ref_list instead of set_event_list", DeprecationWarning, 2)
|
||||
warn( "Use set_event_ref_list instead of set_event_list",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
event_ref_list = []
|
||||
@ -704,7 +683,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
"""
|
||||
if not type(mrel) == tuple:
|
||||
if mrel in range(0, 8):
|
||||
warn( "add_parent_family_handle now takes a tuple", DeprecationWarning, 2)
|
||||
warn( "add_parent_family_handle now takes a tuple",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
mrel = (mrel, '')
|
||||
@ -712,7 +692,8 @@ class Person(PrimaryObject,SourceNote,
|
||||
assert type(mrel) == tuple
|
||||
if not type(frel) == tuple:
|
||||
if frel in range(0, 8):
|
||||
warn( "add_parent_family_handle now takes a tuple", DeprecationWarning, 2)
|
||||
warn( "add_parent_family_handle now takes a tuple",
|
||||
DeprecationWarning, 2)
|
||||
# Wrapper for old API
|
||||
# remove when transitition done.
|
||||
frel = (frel, '')
|
||||
|
Loading…
Reference in New Issue
Block a user