* various: pychecker fixes
svn: r5466
This commit is contained in:
parent
83353aa26f
commit
48283abac1
@ -1,4 +1,5 @@
|
||||
2005-12-01 Don Allingham <don@gramps-project.org>
|
||||
* various: pychecker fixes
|
||||
* src/DateParser.py: properly call the date checking routine
|
||||
|
||||
2005-12-01 Alex Roitman <shura@gramps-project.org>
|
||||
|
@ -33,7 +33,6 @@ Module responsible for handling the command line arguments for GRAMPS.
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
import getopt
|
||||
import time
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -811,6 +811,10 @@ class LikelyFilter(GenericFilter.Rule):
|
||||
labels = [ 'Person handle' ]
|
||||
category = _('General filters')
|
||||
|
||||
def __init__(self,data_list,gender):
|
||||
GenericFilter.Rule.__init__(self,data_list)
|
||||
self.gender = gender
|
||||
|
||||
def prepare(self,db):
|
||||
person = db.get_person_from_handle(self.list[0])
|
||||
birth = db.get_event_from_handle(person.birth_handle)
|
||||
@ -833,12 +837,10 @@ class LikelyFilter(GenericFilter.Rule):
|
||||
class LikelyFather(LikelyFilter):
|
||||
|
||||
name = _('Likely Father')
|
||||
description = _('Matches likely fathers')
|
||||
description = _('Matches likely fathersn')
|
||||
|
||||
def __init__(self,data_list):
|
||||
GenericFilter.Rule.__init__(self,data_list)
|
||||
self.gender = RelLib.Person.MALE
|
||||
|
||||
LikelyFilter.__init__(self,data_list,RelLib.Person.MALE)
|
||||
|
||||
class LikelyMother(LikelyFilter):
|
||||
|
||||
@ -846,6 +848,5 @@ class LikelyMother(LikelyFilter):
|
||||
description = _('Matches likely mothers')
|
||||
|
||||
def __init__(self,data_list):
|
||||
GenericFilter.Rule.__init__(self,data_list)
|
||||
self.gender = RelLib.Person.FEMALE
|
||||
LikelyFilter.__init__(self,data_list,RelLib.Person.FEMALE)
|
||||
|
||||
|
@ -1255,7 +1255,7 @@ class EditPerson:
|
||||
|
||||
def on_web_go_clicked(self,obj):
|
||||
"""Attempts to display the selected URL in a web browser"""
|
||||
test = self.web_url.get()
|
||||
text = self.web_url.get()
|
||||
if text:
|
||||
GrampsDisplay.url(text)
|
||||
|
||||
|
@ -384,7 +384,6 @@ class EditPlace:
|
||||
def on_web_go_clicked(self,obj):
|
||||
text = self.web_url.get()
|
||||
if text != "":
|
||||
import GrampsDisplay
|
||||
GrampsDisplay.url(text)
|
||||
|
||||
def set(self,field,getf,setf):
|
||||
|
@ -304,7 +304,6 @@ class EditSource:
|
||||
source = self.db.get_source_from_handle(handle)
|
||||
EditSource(source,self.db,self.parent,None,self.db.readonly)
|
||||
elif data_type == 5:
|
||||
import ImageSelect
|
||||
media = self.db.get_object_from_handle(handle)
|
||||
ImageSelect.GlobalMediaProperties(self.db,media,self)
|
||||
|
||||
|
@ -251,7 +251,7 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
||||
def get_event_cursor(self):
|
||||
assert False, "Needs to be overridden in the derived class"
|
||||
|
||||
def load(self,name,callback):
|
||||
def load(self,name,callback,mode="w"):
|
||||
"""
|
||||
Opens the specified database. The method needs to be overridden
|
||||
in the derived class.
|
||||
|
@ -86,7 +86,7 @@ class GrampsInMemDB(GrampsDbBase):
|
||||
self.oid_trans = {}
|
||||
self.undodb = []
|
||||
|
||||
def load(self,name,callback):
|
||||
def load(self,name,callback,mode="w"):
|
||||
pass
|
||||
|
||||
def get_person_cursor(self):
|
||||
|
@ -220,7 +220,7 @@ class MergeSources:
|
||||
|
||||
def help(self,obj):
|
||||
"""Display the relevant portion of GRAMPS manual"""
|
||||
help_display('gramps-manual','adv-merge-sources')
|
||||
GrampsDisplay.help('adv-merge-sources')
|
||||
|
||||
def merge(self,obj):
|
||||
"""
|
||||
|
@ -156,9 +156,9 @@ class Compare:
|
||||
slist = person.get_family_handle_list()
|
||||
if len(slist) > 0:
|
||||
for fid in slist:
|
||||
(fn,mn,id) = self.get_parent_info(fid)
|
||||
(fn,mn,pid) = self.get_parent_info(fid)
|
||||
family = self.db.get_family_from_handle(fid)
|
||||
self.add(tobj,normal,"%s:\t%s" % (_('Family ID'),id))
|
||||
self.add(tobj,normal,"%s:\t%s" % (_('Family ID'),pid))
|
||||
spouse_id = ReportUtils.find_spouse(person,family)
|
||||
if spouse_id:
|
||||
spouse = self.db.get_person_from_handle(spouse_id)
|
||||
|
@ -24,14 +24,6 @@
|
||||
Class handling language-specific displaying of names.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
import locale
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
|
@ -416,7 +416,6 @@ class Options:
|
||||
|
||||
if self.enable_dict:
|
||||
self.options_dict.update(self.enable_dict)
|
||||
print name
|
||||
self.handler = OptionHandler(name,self.options_dict,person_id)
|
||||
|
||||
def set_new_options(self):
|
||||
|
@ -47,7 +47,6 @@ except:
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import GrampsCfg
|
||||
import Relationship
|
||||
import NameDisplay
|
||||
import RelLib
|
||||
|
@ -58,7 +58,7 @@ import Utils
|
||||
import GrampsMime
|
||||
from bsddb import db
|
||||
from GedcomInfo import *
|
||||
from QuestionDialog import ErrorDialog
|
||||
from QuestionDialog import ErrorDialog, WarningDialog
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -86,8 +86,6 @@ UPDATE = 25
|
||||
|
||||
callback = None
|
||||
|
||||
_title_string = _("GEDCOM")
|
||||
|
||||
def nocnv(s):
|
||||
return unicode(s)
|
||||
|
||||
|
@ -441,7 +441,7 @@ class SourceNote(BaseObject,NoteBase):
|
||||
@param source: Object used to initialize the new object
|
||||
@type source: SourceNote
|
||||
"""
|
||||
|
||||
BaseObject.__init__(self)
|
||||
NoteBase.__init__(self,source)
|
||||
if source:
|
||||
self.source_list = [SourceRef(sref) for sref in source.source_list]
|
||||
@ -3096,6 +3096,7 @@ class Location(BaseObject):
|
||||
|
||||
def __init__(self,source=None):
|
||||
"""creates a Location object, copying from the source object if it exists"""
|
||||
BaseObject.__init__(self)
|
||||
if source:
|
||||
self.city = source.city
|
||||
self.parish = source.parish
|
||||
@ -3196,6 +3197,7 @@ class Note(BaseObject):
|
||||
"""
|
||||
Creates a new Note object, initializing from the passed string.
|
||||
"""
|
||||
BaseObject.__init__(self)
|
||||
self.text = text
|
||||
self.format = 0
|
||||
|
||||
@ -3800,6 +3802,7 @@ class Url(BaseObject,PrivacyBase):
|
||||
|
||||
def __init__(self,source=None):
|
||||
"""creates a new URL instance, copying from the source if present"""
|
||||
BaseObject.__init__(self)
|
||||
PrivacyBase.__init__(self,source)
|
||||
if source:
|
||||
self.path = source.path
|
||||
@ -3853,6 +3856,7 @@ class Witness(BaseObject,PrivacyBase):
|
||||
the person's name.
|
||||
"""
|
||||
def __init__(self,type=Event.NAME,val="",comment=""):
|
||||
BaseObject.__init__(self)
|
||||
PrivacyBase.__init__(self)
|
||||
self.set_type(type)
|
||||
self.set_value(val)
|
||||
@ -3904,6 +3908,7 @@ class SourceRef(BaseObject,DateBase,PrivacyBase,NoteBase):
|
||||
|
||||
def __init__(self,source=None):
|
||||
"""creates a new SourceRef, copying from the source if present"""
|
||||
BaseObject.__init__(self)
|
||||
DateBase.__init__(self,source)
|
||||
PrivacyBase.__init__(self,source)
|
||||
NoteBase.__init__(self,source)
|
||||
|
@ -30,7 +30,6 @@ Report option handling, including saving and parsing.
|
||||
# Standard Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -496,12 +495,7 @@ class ReportOptions(Options.Options):
|
||||
Initializes the class, performing usual house-keeping tasks.
|
||||
Subclasses MUST call this in their __init__() method.
|
||||
"""
|
||||
self.set_new_options()
|
||||
self.enable_options()
|
||||
|
||||
if self.enable_dict:
|
||||
self.options_dict.update(self.enable_dict)
|
||||
self.handler = OptionHandler(name,self.options_dict,person_id)
|
||||
Options.Options.__init__(self,name,person_id)
|
||||
|
||||
def make_default_style(self,default_style):
|
||||
"""
|
||||
|
@ -30,7 +30,6 @@
|
||||
# general modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
import gc
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -50,7 +50,6 @@ import RelLib
|
||||
import Date
|
||||
import DateEdit
|
||||
import DateHandler
|
||||
import GrampsDBCallback
|
||||
import GrampsDisplay
|
||||
import Spell
|
||||
|
||||
|
@ -40,6 +40,7 @@ from gettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user