* various: pyflakes fixes

svn: r6982
This commit is contained in:
Don Allingham 2006-07-03 04:25:33 +00:00
parent 33a3a1a755
commit 5650391bd1
47 changed files with 20 additions and 235 deletions

View File

@ -1,4 +1,5 @@
2006-07-02 Don Allingham <don@gramps-project.org>
* various: pyflakes fixes
* src/DataViews/_PedigreeView.py: add filter editor support
* src/DataViews/_Relationship.py: add filter editor support
* src/DataViews/_PersonView.py: move filter editor support to PageView

View File

@ -25,7 +25,6 @@
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
@ -35,13 +34,12 @@ import gtk.gdk
import RelLib
import PageView
import DisplayModels
import const
import Utils
import Errors
import Bookmarks
from DdTargets import DdTargets
from QuestionDialog import QuestionDialog, ErrorDialog
from QuestionDialog import QuestionDialog
from Editors import EditEvent, DelEventQuery
#-------------------------------------------------------------------------

View File

@ -19,14 +19,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
# gramps modules
@ -36,9 +28,7 @@ import RelLib
import PageView
import DisplayModels
import Bookmarks
import const
import Errors
from QuestionDialog import QuestionDialog, ErrorDialog
#-------------------------------------------------------------------------
#

View File

@ -32,7 +32,6 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
@ -47,7 +46,7 @@ import Utils
import Bookmarks
from Editors import EditMedia
import Errors
from QuestionDialog import QuestionDialog, ErrorDialog
from QuestionDialog import QuestionDialog
column_names = [
_('Title'),

View File

@ -51,7 +51,6 @@ from gtk.gdk import ACTION_COPY, BUTTON1_MASK
import RelLib
from DisplayModels import PeopleModel
import PageView
import GrampsWidgets
import NameDisplay
import Utils
import QuestionDialog
@ -59,10 +58,9 @@ import TreeTips
import Errors
import Config
import const
from QuestionDialog import ErrorDialog
from Editors import EditPerson
from Filters import SearchBar, GenericFilter, PersonSidebarFilter
from Filters import SearchBar, PersonSidebarFilter
from DdTargets import DdTargets
column_names = [
@ -147,7 +145,7 @@ class PersonView(PageView.PersonNavView):
mlist = self.get_selected_objects()
if len(mlist) != 2:
ErrorDialog(
QuestionDialog.ErrorDialog(
_("Cannot merge people"),
_("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the "
@ -159,7 +157,7 @@ class PersonView(PageView.PersonNavView):
if p1 and p2:
Merge.PersonCompare(self.dbstate, self.uistate, p1, p2)
else:
ErrorDialog(
QuestionDialog.ErrorDialog(
_("Cannot merge people"),
_("Exactly two people must be selected to perform a "
"merge. A second person can be selected by holding "
@ -170,7 +168,7 @@ class PersonView(PageView.PersonNavView):
mlist = self.get_selected_objects()
if len(mlist) != 2:
ErrorDialog(
QuestionDialog.ErrorDialog(
_("Cannot merge people"),
_("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the "
@ -183,7 +181,7 @@ class PersonView(PageView.PersonNavView):
if p1 and p2:
Merge.MergePeopleUI(self.dbstate, self.uistate, p1, p2)
else:
ErrorDialog(
QuestionDialog.ErrorDialog(
_("Cannot merge people"),
_("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the "

View File

@ -25,7 +25,6 @@
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
@ -35,7 +34,6 @@ import gtk.gdk
import RelLib
import PageView
import DisplayModels
import const
import Utils
import Errors
import Bookmarks

View File

@ -25,7 +25,6 @@
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
@ -35,14 +34,13 @@ import gtk.gdk
import RelLib
import PageView
import DisplayModels
import const
import Utils
import Bookmarks
import Errors
from Editors import EditRepository, DelRepositoryQuery
from DdTargets import DdTargets
from QuestionDialog import QuestionDialog, ErrorDialog
from QuestionDialog import QuestionDialog
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,6 @@
#
#-------------------------------------------------------------------------
import gtk
import gtk.gdk
#-------------------------------------------------------------------------
#
@ -35,7 +34,6 @@ import gtk.gdk
import RelLib
import PageView
import DisplayModels
import const
import Utils
import Bookmarks
import Errors

View File

@ -27,6 +27,7 @@
import time
import logging
log = logging.getLogger(".")
try:
set()
except:
@ -44,7 +45,6 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
import const
import ToolTips
import GrampsLocale
import DateHandler

View File

@ -38,11 +38,6 @@ import cgi
import sys
import locale
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# set up logging

View File

@ -24,7 +24,6 @@
# python modules
#
#-------------------------------------------------------------------------
import time
import logging
log = logging.getLogger(".")
@ -45,9 +44,6 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
import const
import ToolTips
import GrampsLocale
import RelLib
from _BaseModel import BaseModel
@ -220,8 +216,3 @@ class RepositoryModel(BaseModel):
def column_tooltip(self,data):
return ""
# try:
# t = ToolTips.TipFromFunction(self.db, lambda: self.db.get_repository_from_handle(data[0]))
# except:
# log.error("Failed to create tooltip.", exc_info=True)
# return t

View File

@ -32,7 +32,6 @@ from gettext import gettext as _
# GRAMPS classes
#
#-------------------------------------------------------------------------
from DdTargets import DdTargets
from _DataModel import DataModel
from _EmbeddedList import EmbeddedList

View File

@ -20,13 +20,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes

View File

@ -20,13 +20,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes

View File

@ -20,6 +20,13 @@
# $Id$
#-------------------------------------------------------------------------
#
# python libraries
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GTK libraries

View File

@ -20,13 +20,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes

View File

@ -20,20 +20,12 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes
#
#-------------------------------------------------------------------------
import RelLib
from DdTargets import DdTargets
from _EventEmbedList import EventEmbedList
_std_types = [

View File

@ -20,13 +20,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes

View File

@ -20,13 +20,6 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python classes
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS classes

View File

@ -48,8 +48,6 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import RelLib
import GrampsDisplay
from _EditSecondary import EditSecondary
from DisplayTabs import SourceEmbedList, NoteTab

View File

@ -45,7 +45,6 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import RelLib
from _EditSecondary import EditSecondary
from DisplayTabs import SourceEmbedList, NoteTab

View File

@ -27,18 +27,12 @@
#-------------------------------------------------------------------------
from gettext import gettext as _
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -46,12 +40,11 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import AutoComp
import RelLib
import GrampsDisplay
from _EditPrimary import EditPrimary
from QuestionDialog import WarningDialog, ErrorDialog
from QuestionDialog import ErrorDialog
from DisplayTabs import SourceEmbedList, NoteTab, GalleryTab, EventBackRefList
from GrampsWidgets import *

View File

@ -27,18 +27,12 @@
#-------------------------------------------------------------------------
from gettext import gettext as _
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#

View File

@ -52,9 +52,7 @@ log = logging.getLogger(".")
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -64,10 +62,7 @@ import gtk.glade
import const
import Utils
import NameDisplay
import Spell
import GrampsDisplay
import RelLib
import AutoComp
import Config
import Errors

View File

@ -49,7 +49,6 @@ import gtk.glade
#-------------------------------------------------------------------------
import const
import RelLib
import GrampsDisplay
import NameDisplay
import LdsUtils

View File

@ -26,7 +26,6 @@
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#

View File

@ -33,9 +33,7 @@ import os
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -49,7 +47,6 @@ import ImgManip
from _EditPrimary import EditPrimary
from GrampsWidgets import *
from QuestionDialog import ErrorDialog
from DisplayTabs import SourceEmbedList,AttrEmbedList,NoteTab,MediaBackRefList
#-------------------------------------------------------------------------

View File

@ -32,9 +32,7 @@ from gettext import gettext as _
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -42,7 +40,6 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import RelLib
import Mime
import ImgManip

View File

@ -42,8 +42,6 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
import gtk.gdk
try:
set()
@ -60,7 +58,6 @@ import Utils
import Mime
import RelLib
import GrampsWidgets
import Config
from GrampsDb import set_birth_death_index
@ -140,16 +137,6 @@ class EditPerson(EditPrimary):
else:
self.surname_field.grab_focus()
# if not Config.get(Config.HIDE_EP_MSG):
# MessageHideDialog(
# _('Editing a person'),
# _('This window allows you to enter information about '
# 'a person. You can add events, including birth and '
# 'death information under the Events tab. Similarly, '
# 'you can add additional information, such as sources, '
# 'names, and images on other tabs.'),
# Config.HIDE_EP_MSG)
def _connect_signals(self):
"""
Connects any signals that need to be connected. Called by the

View File

@ -35,9 +35,7 @@ log = logging.getLogger(".")
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -45,7 +43,6 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import Utils
import RelLib
from _EditPrimary import EditPrimary

View File

@ -20,36 +20,12 @@
# $Id: _EditSourceRef.py 6068 2006-03-04 06:34:48Z dallingham $
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
# gramps modules
#
#-------------------------------------------------------------------------
import const
import RelLib
import ManagedWindow
from QuestionDialog import WarningDialog, ErrorDialog
from GrampsWidgets import *
#-------------------------------------------------------------------------

View File

@ -27,18 +27,12 @@
#-------------------------------------------------------------------------
from gettext import gettext as _
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#
@ -46,7 +40,6 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import RelLib
from DisplayTabs import NoteTab,AddrEmbedList,WebEmbedList,SourceBackRefList
from GrampsWidgets import *

View File

@ -33,7 +33,6 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#

View File

@ -20,10 +20,7 @@
# $Id$
from gettext import gettext as _
import ManagedWindow
import Config
import GrampsDisplay
class EditSecondary(ManagedWindow.ManagedWindow):

View File

@ -35,7 +35,6 @@ log = logging.getLogger(".")
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk.glade
#-------------------------------------------------------------------------
@ -45,9 +44,6 @@ import gtk.glade
#-------------------------------------------------------------------------
import const
import RelLib
import NameDisplay
import Spell
import GrampsDisplay
from _EditPrimary import EditPrimary
from DisplayTabs import \

View File

@ -27,18 +27,12 @@
#-------------------------------------------------------------------------
from gettext import gettext as _
try:
set()
except:
from sets import Set as set
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gtk
import gtk.glade
#-------------------------------------------------------------------------
#

View File

@ -26,7 +26,6 @@
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from cgi import escape
#-------------------------------------------------------------------------
#

View File

@ -31,7 +31,6 @@ __author__ = "Don Allingham"
# Python modules
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
#------------------------------------------------------------------------
@ -42,25 +41,15 @@ from gettext import gettext as _
import logging
log = logging.getLogger(".FilterEdit")
#-------------------------------------------------------------------------
#
# GTK/GNOME
#
#-------------------------------------------------------------------------
import gtk
import GrampsDisplay
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
import const
import RelLib
from Filters import GenericFilter, FilterList, Rules, \
reload_custom_filters, reload_system_filters
import ListModel
import ManagedWindow
import GrampsDisplay
#-------------------------------------------------------------------------
#

View File

@ -31,7 +31,6 @@ __author__ = "Don Allingham"
# Python modules
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
#------------------------------------------------------------------------
@ -58,8 +57,7 @@ import GrampsDisplay
#-------------------------------------------------------------------------
import const
import RelLib
from Filters import GenericFilter, FilterList, Rules, \
reload_custom_filters, reload_system_filters
from Filters import Rules
import AutoComp
from Selectors import selector_factory
SelectPerson = selector_factory('Person')

View File

@ -31,7 +31,6 @@ __author__ = "Don Allingham"
# Python modules
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
#------------------------------------------------------------------------
@ -47,7 +46,6 @@ log = logging.getLogger(".FilterEdit")
# GTK/GNOME
#
#-------------------------------------------------------------------------
import gtk
import GrampsDisplay
#-------------------------------------------------------------------------
@ -56,7 +54,6 @@ import GrampsDisplay
#
#-------------------------------------------------------------------------
import const
import RelLib
from Filters import GenericFilter, FilterList, \
reload_custom_filters, reload_system_filters
import ListModel

View File

@ -24,13 +24,6 @@
Attribute class for GRAMPS
"""
#-------------------------------------------------------------------------
#
# standard python modules
#
#-------------------------------------------------------------------------
from warnings import warn
#-------------------------------------------------------------------------
#
# GRAMPS modules

View File

@ -24,13 +24,6 @@
Event object for GRAMPS
"""
#-------------------------------------------------------------------------
#
# standard python modules
#
#-------------------------------------------------------------------------
from warnings import warn
#-------------------------------------------------------------------------
#
# GRAMPS modules

View File

@ -24,13 +24,6 @@
Event Reference class for GRAMPS
"""
#-------------------------------------------------------------------------
#
# standard python modules
#
#-------------------------------------------------------------------------
from warnings import warn
#-------------------------------------------------------------------------
#
# GRAMPS modules

View File

@ -24,13 +24,6 @@
Name class for GRAMPS
"""
#-------------------------------------------------------------------------
#
# standard python modules
#
#-------------------------------------------------------------------------
from warnings import warn
#-------------------------------------------------------------------------
#
# GRAMPS modules

View File

@ -46,7 +46,6 @@ from _LdsOrdBase import LdsOrdBase
from _UrlBase import UrlBase
from _Name import Name
from _EventRef import EventRef
from _LdsOrd import LdsOrd
from _PersonRef import PersonRef
from _MarkerType import MarkerType
from _AttributeType import AttributeType

View File

@ -24,13 +24,6 @@
Repository object for GRAMPS
"""
#-------------------------------------------------------------------------
#
# standard python modules
#
#-------------------------------------------------------------------------
from warnings import warn
#-------------------------------------------------------------------------
#
# GRAMPS modules

View File

@ -36,7 +36,6 @@ from _DateBase import DateBase
from _PrivacyBase import PrivacyBase
from _NoteBase import NoteBase
from _RefBase import RefBase
from _Note import Note
#-------------------------------------------------------------------------
#