Tidy up class definitions

All python3 classes are new-style classes.  It is no longer
necessary to inherit from object.
This commit is contained in:
Nick Hall 2016-05-10 15:54:31 +01:00
parent 5a72efc387
commit f688a96e9a
192 changed files with 303 additions and 303 deletions

View File

@ -147,7 +147,7 @@ def _split_options(options_str):
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# ArgHandler # ArgHandler
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ArgHandler(object): class ArgHandler:
""" """
This class is responsible for the non GUI handling of commands. This class is responsible for the non GUI handling of commands.
The handler is passed a parser object, sanitizes it, and can execute the The handler is passed a parser object, sanitizes it, and can execute the

View File

@ -128,7 +128,7 @@ Syntax may be different for other shells and for Windows.
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# ArgParser # ArgParser
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ArgParser(object): class ArgParser:
""" """
This class is responsible for parsing the command line arguments (if any) This class is responsible for parsing the command line arguments (if any)
given to gramps, and determining if a GUI or a CLI session must be started. given to gramps, and determining if a GUI or a CLI session must be started.

View File

@ -87,7 +87,7 @@ def _errordialog(title, errormessage):
# CLIDbManager # CLIDbManager
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class CLIDbManager(object): class CLIDbManager:
""" """
Database manager without GTK functionality, allows users to create and Database manager without GTK functionality, allows users to create and
open databases open databases

View File

@ -68,7 +68,7 @@ from gramps.gen.recentfiles import recent_files
# CLI DbLoader class # CLI DbLoader class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class CLIDbLoader(object): class CLIDbLoader:
""" """
Base class for Db loading action inside a :class:`.DbState`. Only the Base class for Db loading action inside a :class:`.DbState`. Only the
minimum is present needed for CLI handling minimum is present needed for CLI handling
@ -215,7 +215,7 @@ class CLIDbLoader(object):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class CLIManager(object): class CLIManager:
""" """
Sessionmanager for Gramps. This is in effect a reduced :class:`.ViewManager` Sessionmanager for Gramps. This is in effect a reduced :class:`.ViewManager`
instance (see gui/viewmanager), suitable for CLI actions. instance (see gui/viewmanager), suitable for CLI actions.

View File

@ -197,7 +197,7 @@ def _validate_options(options, dbase):
# Command-line report # Command-line report
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class CommandLineReport(object): class CommandLineReport:
""" """
Provide a way to generate report from the command line. Provide a way to generate report from the command line.
""" """

View File

@ -49,7 +49,7 @@ from ._datestrings import DateStrings
# DateDisplay # DateDisplay
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateDisplay(object): class DateDisplay:
""" """
Base date display class. Base date display class.
""" """

View File

@ -186,7 +186,7 @@ def _generate_variants(months):
# DateParser class # DateParser class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateParser(object): class DateParser:
""" """
Convert a text string into a :class:`.Date` object. If the date cannot be Convert a text string into a :class:`.Date` object. If the date cannot be
converted, the text string is assigned. converted, the text string is assigned.

View File

@ -51,7 +51,7 @@ log = logging.getLogger(".DateStrings")
# DateStrings # DateStrings
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateStrings(object): class DateStrings:
""" """
String tables for :class:`.DateDisplay` and :class:`.DateParser`. String tables for :class:`.DateDisplay` and :class:`.DateParser`.
""" """

View File

@ -85,7 +85,7 @@ def sort_objects(objects, order_by, db):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DbReadBase(object): class DbReadBase:
""" """
Gramps database object. This object is a base class for all Gramps database object. This object is a base class for all
database interfaces. All methods raise NotImplementedError database interfaces. All methods raise NotImplementedError
@ -2119,7 +2119,7 @@ class DbWriteBase(DbReadBase):
user.uistate.set_busy_cursor(False) user.uistate.set_busy_cursor(False)
user.uistate.progress.hide() user.uistate.progress.hide()
class QuerySet(object): class QuerySet:
""" """
A container for selection criteria before being actually A container for selection criteria before being actually
applied to a database. applied to a database.

View File

@ -202,7 +202,7 @@ class DbGenericUndo(DbUndo):
db.undo_history_callback() db.undo_history_callback()
return True return True
class Environment(object): class Environment:
""" """
Implements the Environment API. Implements the Environment API.
""" """
@ -215,7 +215,7 @@ class Environment(object):
def txn_checkpoint(self): def txn_checkpoint(self):
pass pass
class Table(object): class Table:
""" """
Implements Table interface. Implements Table interface.
""" """
@ -236,7 +236,7 @@ class Table(object):
def put(self, key, data, txn=None): def put(self, key, data, txn=None):
self.funcs["add_func"](data, txn) self.funcs["add_func"](data, txn)
class Map(object): class Map:
""" """
Implements the map API for person_map, etc. Implements the map API for person_map, etc.
@ -285,7 +285,7 @@ class Map(object):
def delete(self, key): def delete(self, key):
self.table.funcs["del_func"](key, self.txn) self.table.funcs["del_func"](key, self.txn)
class MetaCursor(object): class MetaCursor:
def __init__(self): def __init__(self):
pass pass
def __enter__(self): def __enter__(self):
@ -309,7 +309,7 @@ class MetaCursor(object):
def close(self): def close(self):
pass pass
class Cursor(object): class Cursor:
def __init__(self, map): def __init__(self, map):
self.map = map self.map = map
self._iter = self.__iter__() self._iter = self.__iter__()
@ -358,7 +358,7 @@ class TreeCursor(Cursor):
for handle in handles: for handle in handles:
yield (handle, self.db._get_raw_place_data(handle)) yield (handle, self.db._get_raw_place_data(handle))
class Bookmarks(object): class Bookmarks:
def __init__(self, default=[]): def __init__(self, default=[]):
self.handles = list(default) self.handles = list(default)

View File

@ -34,7 +34,7 @@ def make_closure(surname):
(person.primary_name.surname_list[0].surname == surname and (person.primary_name.surname_list[0].surname == surname and
person.gender == Person.MALE)) person.gender == Person.MALE))
class Thing(object): class Thing:
def __init__(self): def __init__(self):
self.list = ["I0", "I1", "I2"] self.list = ["I0", "I1", "I2"]

View File

@ -7,7 +7,7 @@ import time
import pickle import pickle
from collections import deque from collections import deque
class DbUndo(object): class DbUndo:
""" """
Base class for the Gramps undo/redo manager. Needs to be subclassed Base class for the Gramps undo/redo manager. Needs to be subclassed
for use with a real backend. for use with a real backend.

View File

@ -318,7 +318,7 @@ def cleanup_name(namestring):
# NameDisplay class # NameDisplay class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class NameDisplay(object): class NameDisplay:
""" """
Base class for displaying of Name instances. Base class for displaying of Name instances.
@ -504,7 +504,7 @@ class NameDisplay(object):
We use this in Gramps as understanding the old compare function is We use this in Gramps as understanding the old compare function is
not trivial. This should be replaced by a proper key function not trivial. This should be replaced by a proper key function
""" """
class K(object): class K:
def __init__(self, obj, *args): def __init__(self, obj, *args):
self.obj = obj self.obj = obj
def __lt__(self, other): def __lt__(self, other):

View File

@ -36,7 +36,7 @@ from ..lib import PlaceType
# PlaceDisplay class # PlaceDisplay class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class PlaceDisplay(object): class PlaceDisplay:
def display_event(self, db, event): def display_event(self, db, event):
if not event: if not event:

View File

@ -43,7 +43,7 @@ PLUGMAN = BasePluginManager.get_instance()
# FilterList # FilterList
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class FilterList(object): class FilterList:
""" """
Container class for managing the generic filters. Container class for managing the generic filters.
It stores, saves, and loads the filters. It stores, saves, and loads the filters.

View File

@ -46,7 +46,7 @@ from ..lib.tag import Tag
# GenericFilter # GenericFilter
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class GenericFilter(object): class GenericFilter:
"""Filter class that consists of several rules.""" """Filter class that consists of several rules."""
logical_functions = ['or', 'and', 'xor', 'one'] logical_functions = ['or', 'and', 'xor', 'one']

View File

@ -24,7 +24,7 @@ Package providing filtering framework for GRAMPS.
from gramps.gen.constfunc import win from gramps.gen.constfunc import win
class SearchFilter(object): class SearchFilter:
def __init__(self, func, text, invert): def __init__(self, func, text, invert):
self.func = func self.func = func
self.text = text.upper() self.text = text.upper()

View File

@ -45,7 +45,7 @@ LOG = logging.getLogger(".")
# Rule # Rule
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Rule(object): class Rule:
"""Base rule class.""" """Base rule class."""
labels = [] labels = []

View File

@ -36,7 +36,7 @@ from .const import IDENTICAL, EQUAL
# AddressBase classes # AddressBase classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class AddressBase(object): class AddressBase:
""" """
Base class for address-aware objects. Base class for address-aware objects.
""" """

View File

@ -37,7 +37,7 @@ from .const import IDENTICAL, EQUAL
# AttributeRootBase class # AttributeRootBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class AttributeRootBase(object): class AttributeRootBase:
""" """
Base class for attribute-aware objects. Base class for attribute-aware objects.
""" """

View File

@ -34,7 +34,7 @@ import re
# Base Object # Base Object
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class BaseObject(object): class BaseObject:
""" """
The BaseObject is the base class for all data objects in Gramps, The BaseObject is the base class for all data objects in Gramps,
whether primary or not. whether primary or not.

View File

@ -45,7 +45,7 @@ LOG = logging.getLogger(".citation")
# CitationBase class # CitationBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class CitationBase(object): class CitationBase:
""" """
Base class for storing citations. Base class for storing citations.
@ -272,7 +272,7 @@ class CitationBase(object):
for item in self.get_citation_child_list(): for item in self.get_citation_child_list():
item.replace_citation_references(old_handle, new_handle) item.replace_citation_references(old_handle, new_handle)
class IndirectCitationBase(object): class IndirectCitationBase:
""" """
Citation management logic for objects that don't have citations Citation management logic for objects that don't have citations
for the primary objects, but only for the child (secondary) ones. for the primary objects, but only for the child (secondary) ones.

View File

@ -54,7 +54,7 @@ _ = glocale.translation.sgettext
LOG = logging.getLogger(".Date") LOG = logging.getLogger(".Date")
class Span(object): class Span:
""" """
Span is used to represent the difference between two dates for three Span is used to represent the difference between two dates for three
main purposes: sorting, ranking, and describing. main purposes: sorting, ranking, and describing.
@ -526,7 +526,7 @@ class Span(object):
# Date class # Date class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Date(object): class Date:
""" """
The core date handling class for Gramps. The core date handling class for Gramps.

View File

@ -34,7 +34,7 @@ from .date import Date
# DateBase classes # DateBase classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateBase(object): class DateBase:
""" """
Base class for storing date information. Base class for storing date information.
""" """

View File

@ -35,7 +35,7 @@ from .person import Person
# #
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class GenderStats(object): class GenderStats:
""" """
Class for keeping track of statistics related to Given Name vs. Gender. Class for keeping track of statistics related to Given Name vs. Gender.

View File

@ -36,7 +36,7 @@ from .const import IDENTICAL, EQUAL
# LdsOrdBase classes # LdsOrdBase classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class LdsOrdBase(object): class LdsOrdBase:
""" """
Base class for lds_ord-aware objects. Base class for lds_ord-aware objects.
""" """

View File

@ -28,7 +28,7 @@ LocationBase class for Gramps.
# LocationBase class # LocationBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class LocationBase(object): class LocationBase:
""" """
Base class for all things Address. Base class for all things Address.
""" """

View File

@ -36,7 +36,7 @@ from .const import IDENTICAL, EQUAL, DIFFERENT
# MediaBase class # MediaBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MediaBase(object): class MediaBase:
""" """
Base class for storing media references. Base class for storing media references.
""" """

View File

@ -30,7 +30,7 @@ from .handle import Handle
# NoteBase class # NoteBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class NoteBase(object): class NoteBase:
""" """
Base class for storing notes. Base class for storing notes.

View File

@ -27,7 +27,7 @@ PlaceBase class for Gramps.
# PlaceBase class # PlaceBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class PlaceBase(object): class PlaceBase:
""" """
Base class for place-aware objects. Base class for place-aware objects.
""" """

View File

@ -28,7 +28,7 @@ PrivacyBase Object class for Gramps.
# PrivacyBase Object # PrivacyBase Object
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class PrivacyBase(object): class PrivacyBase:
""" """
Base class for privacy-aware objects. Base class for privacy-aware objects.
""" """

View File

@ -27,7 +27,7 @@ Base Reference class for Gramps.
# RefBase class # RefBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class RefBase(object): class RefBase:
""" """
Base reference class to manage references to other objects. Base reference class to manage references to other objects.

View File

@ -23,7 +23,7 @@ from gramps.gen.lib.handle import HandleClass
def from_struct(struct): def from_struct(struct):
return Struct.instance_from_struct(struct) return Struct.instance_from_struct(struct)
class Struct(object): class Struct:
""" """
Class for getting and setting parts of a struct by dotted path. Class for getting and setting parts of a struct by dotted path.

View File

@ -33,7 +33,7 @@ from .styledtexttag import StyledTextTag
# StyledText class # StyledText class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class StyledText(object): class StyledText:
"""Helper class to enable character based text formatting. """Helper class to enable character based text formatting.
:py:class:`StyledText` is a wrapper class binding the clear text string and :py:class:`StyledText` is a wrapper class binding the clear text string and

View File

@ -33,7 +33,7 @@ from .styledtexttagtype import StyledTextTagType
# StyledTextTag class # StyledTextTag class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class StyledTextTag(object): class StyledTextTag:
"""Hold formatting information for :py:class:`.StyledText`. """Hold formatting information for :py:class:`.StyledText`.
:py:class:`StyledTextTag` is a container class, it's attributes are :py:class:`StyledTextTag` is a container class, it's attributes are

View File

@ -37,7 +37,7 @@ _ = glocale.translation.gettext
# SurnameBase classes # SurnameBase classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class SurnameBase(object): class SurnameBase:
""" """
Base class for surname-aware objects. Base class for surname-aware objects.
""" """

View File

@ -29,7 +29,7 @@ from .handle import Handle
# TagBase class # TagBase class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class TagBase(object): class TagBase:
""" """
Base class for tag-aware objects. Base class for tag-aware objects.
""" """

View File

@ -162,7 +162,7 @@ for calendar in (Date.CAL_JULIAN,
dates.append( d) dates.append( d)
# CAL_SWEDISH - Swedish calendar 1700-03-01 -> 1712-02-30! # CAL_SWEDISH - Swedish calendar 1700-03-01 -> 1712-02-30!
class Context(object): class Context:
def __init__(self, retval): def __init__(self, retval):
self.retval = retval self.retval = retval
def __enter__(self): def __enter__(self):

View File

@ -35,7 +35,7 @@ from .const import IDENTICAL, EQUAL
# UrlBase classes # UrlBase classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class UrlBase(object): class UrlBase:
""" """
Base class for url-aware objects. Base class for url-aware objects.
""" """

View File

@ -40,7 +40,7 @@ from ..errors import MergeError
# MergeCitationQuery # MergeCitationQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeCitationQuery(object): class MergeCitationQuery:
""" """
Create database query to merge two citations. Create database query to merge two citations.
""" """

View File

@ -38,7 +38,7 @@ from ..errors import MergeError
# MergeEventQuery # MergeEventQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeEventQuery(object): class MergeEventQuery:
""" """
Create database query to merge two events. Create database query to merge two events.
""" """

View File

@ -38,7 +38,7 @@ from . import MergePersonQuery
# MergeFamilyQuery # MergeFamilyQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeFamilyQuery(object): class MergeFamilyQuery:
""" """
Create database query to merge two families. Create database query to merge two families.
""" """

View File

@ -38,7 +38,7 @@ from ..errors import MergeError
# MergeMediaQuery # MergeMediaQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeMediaQuery(object): class MergeMediaQuery:
""" """
Create datqabase query to merge two media objects. Create datqabase query to merge two media objects.
""" """

View File

@ -39,7 +39,7 @@ from ..errors import MergeError
# MergeNoteQuery # MergeNoteQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeNoteQuery(object): class MergeNoteQuery:
""" """
Create database query to merge two notes. Create database query to merge two notes.
""" """

View File

@ -39,7 +39,7 @@ from ..errors import MergeError
# MergePersonQuery # MergePersonQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergePersonQuery(object): class MergePersonQuery:
""" """
Create database query to merge two persons. Create database query to merge two persons.
""" """

View File

@ -39,7 +39,7 @@ from ..errors import MergeError
# MergePlaceQuery # MergePlaceQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergePlaceQuery(object): class MergePlaceQuery:
""" """
Create database query to merge two places. Create database query to merge two places.
""" """

View File

@ -38,7 +38,7 @@ from ..errors import MergeError
# MergeRepoQuery # MergeRepoQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeRepositoryQuery(object): class MergeRepositoryQuery:
""" """
Create database query to merge two repositories. Create database query to merge two repositories.
""" """

View File

@ -41,7 +41,7 @@ from ..errors import MergeError
# MergeSourceQuery # MergeSourceQuery
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MergeSourceQuery(object): class MergeSourceQuery:
""" """
Create database query to merge two sources. Create database query to merge two sources.
""" """

View File

@ -39,7 +39,7 @@ _ = glocale.translation.sgettext
HAS_CLIMERGE = os.path.isdir(os.path.join(USER_PLUGINS, 'CliMerge')) HAS_CLIMERGE = os.path.isdir(os.path.join(USER_PLUGINS, 'CliMerge'))
HAS_EXPORTRAW = os.path.isdir(os.path.join(USER_PLUGINS, 'ExportRaw')) HAS_EXPORTRAW = os.path.isdir(os.path.join(USER_PLUGINS, 'ExportRaw'))
class CopiedDoc(object): class CopiedDoc:
"""Context manager that creates a deep copy of an libxml-xml document.""" """Context manager that creates a deep copy of an libxml-xml document."""
def __init__(self, xmldoc): def __init__(self, xmldoc):
self.xmldoc = xmldoc self.xmldoc = xmldoc
@ -53,7 +53,7 @@ class CopiedDoc(object):
self.copy.freeDoc() self.copy.freeDoc()
return False return False
class XpathContext(object): class XpathContext:
"""Context manager that creates a libxml2 xpath context that allows """Context manager that creates a libxml2 xpath context that allows
evaluation of xpath expressions.""" evaluation of xpath expressions."""
def __init__(self, xmldoc): def __init__(self, xmldoc):

View File

@ -36,7 +36,7 @@ LOG = logging.getLogger(".Gramplets")
from ..const import GRAMPS_LOCALE as glocale from ..const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext _ = glocale.translation.gettext
class Gramplet(object): class Gramplet:
""" """
Base class for non-graphical gramplet code. Base class for non-graphical gramplet code.
""" """

View File

@ -65,7 +65,7 @@ _UNAVAILABLE = _("No description was provided")
# BasePluginManager # BasePluginManager
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class BasePluginManager(object): class BasePluginManager:
""" unique singleton storage class for a :class:`.PluginManager`. """ """ unique singleton storage class for a :class:`.PluginManager`. """
__instance = None __instance = None

View File

@ -62,7 +62,7 @@ _ = glocale.translation.gettext
# List of options for a single module # List of options for a single module
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class OptionList(object): class OptionList:
""" """
Implements a set of options to parse and store for a given module. Implements a set of options to parse and store for a given module.
""" """
@ -125,7 +125,7 @@ class OptionList(object):
# Collection of option lists # Collection of option lists
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class OptionListCollection(object): class OptionListCollection:
""" """
Implements a collection of option lists. Implements a collection of option lists.
""" """
@ -322,7 +322,7 @@ class OptionParser(handler.ContentHandler):
# Class handling options for plugins # Class handling options for plugins
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class OptionHandler(object): class OptionHandler:
""" """
Implements handling of the options for the plugins. Implements handling of the options for the plugins.
""" """
@ -434,7 +434,7 @@ class OptionHandler(object):
# Base Options class # Base Options class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class Options(object): class Options:
""" """
Defines options and provides handling interface. Defines options and provides handling interface.
@ -512,7 +512,7 @@ class Options(object):
# MenuOptions class # MenuOptions class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class MenuOptions(object): class MenuOptions:
""" """
**Introduction** **Introduction**

View File

@ -23,7 +23,7 @@
This module provides the base class for plugins. This module provides the base class for plugins.
""" """
class Plugin(object): class Plugin:
""" """
This class serves as a base class for all plugins that can be registered This class serves as a base class for all plugins that can be registered
with the plugin manager with the plugin manager

View File

@ -173,7 +173,7 @@ def valid_plugin_version(plugin_version_string):
plugin_version <= VERSION_TUPLE) plugin_version <= VERSION_TUPLE)
return False return False
class PluginData(object): class PluginData:
""" """
This is the base class for all plugin data objects. This is the base class for all plugin data objects.
The workflow is: The workflow is:
@ -1078,7 +1078,7 @@ def make_environment(**kwargs):
# PluginRegister # PluginRegister
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class PluginRegister(object): class PluginRegister:
""" """
PluginRegister is a Singleton which holds plugin data PluginRegister is a Singleton which holds plugin data

View File

@ -69,7 +69,7 @@ class DocBackendError(Exception):
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class DocBackend(object): class DocBackend:
""" """
Base class for text document backends. Base class for text document backends.
The DocBackend manages a file to which it writes. It further knowns The DocBackend manages a file to which it writes. It further knowns

View File

@ -53,7 +53,7 @@ log = logging.getLogger(".basedoc")
# BaseDoc # BaseDoc
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class BaseDoc(object): class BaseDoc:
""" """
Base class for document generators. Different output formats, Base class for document generators. Different output formats,
such as OpenOffice, AbiWord, and LaTeX are derived from this base such as OpenOffice, AbiWord, and LaTeX are derived from this base

View File

@ -50,7 +50,7 @@ log = logging.getLogger(".drawdoc")
# DrawDoc # DrawDoc
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class DrawDoc(object): class DrawDoc:
""" """
Abstract Interface for graphical document generators. Output formats Abstract Interface for graphical document generators. Output formats
for graphical reports must implement this interface to be used by the for graphical reports must implement this interface to be used by the

View File

@ -58,7 +58,7 @@ FONT_MONOSPACE = 2
# FontStyle # FontStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class FontStyle(object): class FontStyle:
""" """
Defines a font style. Controls the font face, size, color, and Defines a font style. Controls the font face, size, color, and
attributes. In order to remain generic, the only font faces available attributes. In order to remain generic, the only font faces available

View File

@ -108,7 +108,7 @@ else:
# GVOptions # GVOptions
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
class GVOptions(): class GVOptions:
""" """
Defines all of the controls necessary Defines all of the controls necessary
to configure the graph reports. to configure the graph reports.
@ -278,7 +278,7 @@ class GVOptions():
# GVDoc # GVDoc
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
class GVDoc(object): class GVDoc:
""" """
Abstract Interface for Graphviz document generators. Output formats Abstract Interface for Graphviz document generators. Output formats
for Graphviz reports must implement this interface to be used by the for Graphviz reports must implement this interface to be used by the

View File

@ -76,7 +76,7 @@ def get_line_style_by_name(style_name):
# GraphicsStyle # GraphicsStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class GraphicsStyle(object): class GraphicsStyle:
""" """
Defines the properties of graphics objects, such as line width, Defines the properties of graphics objects, such as line width,
color, fill, ect. color, fill, ect.

View File

@ -58,7 +58,7 @@ PAPER_LANDSCAPE = 1
# PaperSize # PaperSize
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class PaperSize(object): class PaperSize:
""" """
Defines the dimensions of a sheet of paper. All dimensions are in Defines the dimensions of a sheet of paper. All dimensions are in
centimeters. centimeters.
@ -116,7 +116,7 @@ class PaperSize(object):
# PaperStyle # PaperStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class PaperStyle(object): class PaperStyle:
""" """
Define the various options for a sheet of paper. Define the various options for a sheet of paper.
""" """

View File

@ -58,7 +58,7 @@ PARA_ALIGN_JUSTIFY = 3
# ParagraphStyle # ParagraphStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class ParagraphStyle(object): class ParagraphStyle:
""" """
Defines the characteristics of a paragraph. The characteristics are: Defines the characteristics of a paragraph. The characteristics are:
font (a :class:`.FontStyle` instance), right margin, left margin, font (a :class:`.FontStyle` instance), right margin, left margin,

View File

@ -83,7 +83,7 @@ def cnv2color(text):
# StyleSheetList # StyleSheetList
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class StyleSheetList(object): class StyleSheetList:
""" """
Interface into the user's defined style sheets. Each StyleSheetList Interface into the user's defined style sheets. Each StyleSheetList
has a predefined default style specified by the report. Additional has a predefined default style specified by the report. Additional
@ -284,7 +284,7 @@ class StyleSheetList(object):
# StyleSheet # StyleSheet
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class StyleSheet(object): class StyleSheet:
""" """
A collection of named paragraph styles. A collection of named paragraph styles.
""" """

View File

@ -47,7 +47,7 @@ log = logging.getLogger(".tablestyle")
# TableStyle # TableStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class TableStyle(object): class TableStyle:
""" """
Specifies the style or format of a table. The TableStyle contains the Specifies the style or format of a table. The TableStyle contains the
characteristics of table width (in percentage of the full width), the characteristics of table width (in percentage of the full width), the
@ -131,7 +131,7 @@ class TableStyle(object):
# TableCellStyle # TableCellStyle
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class TableCellStyle(object): class TableCellStyle:
""" """
Defines the style of a particular table cell. Characteristics are: Defines the style of a particular table cell. Characteristics are:
right border, left border, top border, bottom border, and padding. right border, left border, top border, bottom border, and padding.

View File

@ -68,7 +68,7 @@ LOCAL_TARGET = 3
# IndexMark # IndexMark
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class IndexMark(object): class IndexMark:
""" """
Defines a mark to be associated with text for indexing. Defines a mark to be associated with text for indexing.
""" """
@ -87,7 +87,7 @@ class IndexMark(object):
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class TextDoc(object): class TextDoc:
""" """
Abstract Interface for text document generators. Output formats for Abstract Interface for text document generators. Output formats for
text reports must implement this interface to be used by the report text reports must implement this interface to be used by the report

View File

@ -28,7 +28,7 @@ Abstracted option handling.
# Menu class # Menu class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Menu(object): class Menu:
""" """
**Introduction** **Introduction**

View File

@ -39,7 +39,7 @@ import math
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from ...lib.citation import Citation as lib_Citation from ...lib.citation import Citation as lib_Citation
class Citation(object): class Citation:
""" """
Store information about a citation and all of its references. Store information about a citation and all of its references.
""" """
@ -115,7 +115,7 @@ class Citation(object):
self.__ref_list.append((key, source_ref)) self.__ref_list.append((key, source_ref))
return key return key
class Bibliography(object): class Bibliography:
""" """
Store and organize multiple citations into a bibliography. Store and organize multiple citations into a bibliography.
""" """

View File

@ -77,7 +77,7 @@ _UNSUPPORTED = _("Unsupported")
# Book Item class # Book Item class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class BookItem(object): class BookItem:
""" """
Interface into the book item -- a smallest element of the book. Interface into the book item -- a smallest element of the book.
""" """
@ -150,7 +150,7 @@ class BookItem(object):
# Book class # Book class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class Book(object): class Book:
""" """
Interface into the user-defined book -- a collection of book items. Interface into the user-defined book -- a collection of book items.
""" """
@ -398,7 +398,7 @@ class Book(object):
# BookList class # BookList class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class BookList(object): class BookList:
""" """
Interface into the user-defined list of books. Interface into the user-defined list of books.

View File

@ -607,7 +607,7 @@ class OptionParser(_options.OptionParser):
# we don't have to handle them for reports that don't use documents (web) # we don't have to handle them for reports that don't use documents (web)
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class EmptyDoc(object): class EmptyDoc:
def init(self): def init(self):
pass pass

View File

@ -35,7 +35,7 @@ from gramps.gen.config import config
# Report # Report
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Report(object): class Report:
""" """
The Report base class. This is a base class for generating The Report base class. This is a base class for generating
customized reports. It cannot be used as is, but it can be easily customized reports. It cannot be used as is, but it can be easily

View File

@ -75,7 +75,7 @@ def version_str_to_tup(sversion, positions):
tup = (0,) * positions tup = (0,) * positions
return tup[:positions] return tup[:positions]
class newplugin(object): class newplugin:
""" """
Fake newplugin. Fake newplugin.
""" """
@ -96,7 +96,7 @@ def register(ptype, **kwargs):
else: else:
globals()["register_results"] = [retval] globals()["register_results"] = [retval]
class Zipfile(object): class Zipfile:
""" """
Class to duplicate the methods of tarfile.TarFile, for Python 2.5. Class to duplicate the methods of tarfile.TarFile, for Python 2.5.
""" """
@ -127,7 +127,7 @@ class Zipfile(object):
>>> Zipfile(buffer).extractfile("Dir/dile.py").read() >>> Zipfile(buffer).extractfile("Dir/dile.py").read()
<Contents> <Contents>
""" """
class ExtractFile(object): class ExtractFile:
def __init__(self, zip_obj, name): def __init__(self, zip_obj, name):
self.zip_obj = zip_obj self.zip_obj = zip_obj
self.name = name self.name = name

View File

@ -41,7 +41,7 @@ from ..lib import (MediaRef, Attribute, Address, EventRef,
Family, ChildRef, Repository, LdsOrd, Surname, Citation, Family, ChildRef, Repository, LdsOrd, Surname, Citation,
SrcAttribute, Note, Tag) SrcAttribute, Note, Tag)
class ProxyCursor(object): class ProxyCursor:
""" """
A cursor for moving through proxied data. A cursor for moving through proxied data.
""" """
@ -62,7 +62,7 @@ class ProxyCursor(object):
for handle in self.get_handles(): for handle in self.get_handles():
yield bytes(handle, "utf-8"), self.get_raw(handle) yield bytes(handle, "utf-8"), self.get_raw(handle)
class ProxyMap(object): class ProxyMap:
""" """
A dictionary-like object for accessing "raw" proxied data. Of A dictionary-like object for accessing "raw" proxied data. Of
course, proxied data may have been changed by the proxy. course, proxied data may have been changed by the proxy.

View File

@ -53,7 +53,7 @@ MAX_GRAMPS_ITEMS = 10
# RecentItem # RecentItem
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class RecentItem(object): class RecentItem:
""" """
Interface to a single Gramps recent-items item Interface to a single Gramps recent-items item
""" """
@ -122,7 +122,7 @@ class RecentItem(object):
# RecentFiles # RecentFiles
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class RecentFiles(object): class RecentFiles:
""" """
Interface to a RecentFiles collection Interface to a RecentFiles collection
""" """
@ -235,7 +235,7 @@ class RecentFiles(object):
# RecentParser # RecentParser
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class RecentParser(object): class RecentParser:
""" """
Parsing class for the RecentFiles collection. Parsing class for the RecentFiles collection.
""" """

View File

@ -376,7 +376,7 @@ _NEPHEWS_NIECES_LEVEL = ["",
# RelationshipCalculator # RelationshipCalculator
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class RelationshipCalculator(object): class RelationshipCalculator:
""" """
The relationship calculator helps to determine the relationship between The relationship calculator helps to determine the relationship between
two people. two people.

View File

@ -42,7 +42,7 @@ _ = glocale.translation.gettext
# Local functions # Local functions
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class SimpleAccess(object): class SimpleAccess:
""" """
Provide a simplified database access system. This system has been designed Provide a simplified database access system. This system has been designed
to ease the development of reports. to ease the development of reports.

View File

@ -24,7 +24,7 @@ Provide a simplified database access interface to the Gramps database.
from ..plug.docgen import StyleSheet, ParagraphStyle, TableStyle,\ from ..plug.docgen import StyleSheet, ParagraphStyle, TableStyle,\
TableCellStyle, FONT_SANS_SERIF, PARA_ALIGN_LEFT TableCellStyle, FONT_SANS_SERIF, PARA_ALIGN_LEFT
class SimpleDoc(object): class SimpleDoc:
""" """
Provide a simplified database access interface to the Gramps database. Provide a simplified database access interface to the Gramps database.
""" """

View File

@ -32,7 +32,7 @@ from ..lib import (Person, Family, Event, Source, Place, Citation,
from ..config import config from ..config import config
from ..datehandler import displayer from ..datehandler import displayer
class SimpleTable(object): class SimpleTable:
""" """
Provide a simplified table creation interface. Provide a simplified table creation interface.
""" """

View File

@ -48,7 +48,7 @@ from .const import GRAMPS_LOCALE as glocale
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Sort(object): class Sort:
def __init__(self, database): def __init__(self, database):
self.database = database self.database = database

View File

@ -24,7 +24,7 @@
import unittest import unittest
from .. import user from .. import user
class TestUser(object): class TestUser:
TITLE = "Testing prompt" TITLE = "Testing prompt"
MSG = "Choices are hard. Nevertheless, please choose!" MSG = "Choices are hard. Nevertheless, please choose!"
ACCEPT = "To be" ACCEPT = "To be"

View File

@ -41,7 +41,7 @@ _LOG = logging.getLogger(".gen")
# Callback updater # Callback updater
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class UpdateCallback(object): class UpdateCallback:
""" """
Basic class providing way of calling the callback to update Basic class providing way of calling the callback to update
things during lengthy operations. things during lengthy operations.

View File

@ -25,7 +25,7 @@ The User class provides basic interaction with the user.
import sys import sys
from contextlib import contextmanager from contextlib import contextmanager
class User(): class User:
""" """
This class provides a means to interact with the user in an abstract way. This class provides a means to interact with the user in an abstract way.
This class should be overridden by each respective user interface to This class should be overridden by each respective user interface to

View File

@ -66,7 +66,7 @@ except ImportError:
# ProbablyAlive class # ProbablyAlive class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ProbablyAlive(object): class ProbablyAlive:
""" """
An object to hold the parameters for considering someone alive. An object to hold the parameters for considering someone alive.
""" """

View File

@ -47,7 +47,7 @@ log = sys.stderr.write
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class Callback(object): class Callback:
""" """
Callback and signal support objects. Callback and signal support objects.
@ -104,7 +104,7 @@ class Callback(object):
t.connect('test-signal', fn) t.connect('test-signal', fn)
# connect to a bound method # connect to a bound method
class C(object): class C:
def cb_func(self, i): def cb_func(self, i):
print 'got class signal = ', 1 print 'got class signal = ', 1
@ -124,7 +124,7 @@ class Callback(object):
t = TestSignals() t = TestSignals()
# connect to a bound method # connect to a bound method
class C(object): class C:
def cb_func(self, i): def cb_func(self, i):
print 'got class signal = ', 1 print 'got class signal = ', 1

View File

@ -96,7 +96,7 @@ def _return(*args):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class CallbackManager(object): class CallbackManager:
""" """
Manage callback handling from GUI to the db. Manage callback handling from GUI to the db.
It is unique to a db and some GUI element. When a db is changed, one should It is unique to a db and some GUI element. When a db is changed, one should

View File

@ -59,7 +59,7 @@ def safe_eval(exp):
# Classes # Classes
# #
#--------------------------------------------------------------- #---------------------------------------------------------------
class ConfigManager(object): class ConfigManager:
""" """
Class to construct the singleton CONFIGMAN where all Class to construct the singleton CONFIGMAN where all
settings are stored. settings are stored.

View File

@ -23,7 +23,7 @@
# #
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class TabbedDoc(object): class TabbedDoc:
def __init__(self, columns): def __init__(self, columns):
self.columns = columns self.columns = columns
self.name = "" self.name = ""

View File

@ -141,7 +141,7 @@ def _check_mswin_locale_reverse(locale):
# GrampsLocale Class # GrampsLocale Class
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class GrampsLocale(object): class GrampsLocale:
""" """
Encapsulate a locale. This class is a sort-of-singleton: The Encapsulate a locale. This class is a sort-of-singleton: The
first instance created will query the environment and OSX defaults first instance created will query the environment and OSX defaults

View File

@ -32,7 +32,7 @@ _ = glocale.translation.gettext
LOG = logging.getLogger(".") LOG = logging.getLogger(".")
class LdsTemples(object): class LdsTemples:
""" """
Parsing class for the LDS temples file Parsing class for the LDS temples file
""" """

View File

@ -47,7 +47,7 @@ from .db import (get_birth_or_fallback, get_death_or_fallback,
# FormattingHelper class # FormattingHelper class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class FormattingHelper(object): class FormattingHelper:
"""Format of commonly used expressions, making use of a cache to not """Format of commonly used expressions, making use of a cache to not
recompute recompute
""" """
@ -199,7 +199,7 @@ class FormattingHelper(object):
self._markup_cache = {} self._markup_cache = {}
class ImportInfo(object): class ImportInfo:
""" """
Class object that can hold information about the import Class object that can hold information about the import
""" """

View File

@ -27,7 +27,7 @@ LOG.addHandler(_hdlr)
from ..constfunc import get_env_var from ..constfunc import get_env_var
class ResourcePath(object): class ResourcePath:
""" """
ResourcePath is a singleton, meaning that only one of them is ever ResourcePath is a singleton, meaning that only one of them is ever
created. At startup it finds the paths to Gramps's resource files and created. At startup it finds the paths to Gramps's resource files and

View File

@ -73,7 +73,7 @@ def fill_entry(entry, data_list):
# StandardCustomSelector class # StandardCustomSelector class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class StandardCustomSelector(object): class StandardCustomSelector:
""" """
This class provides an interface to selecting from the predefined This class provides an interface to selecting from the predefined
options or entering custom string. options or entering custom string.

View File

@ -23,7 +23,7 @@
# BaseSidebar class # BaseSidebar class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class BaseSidebar(object): class BaseSidebar:
""" """
The base class for all sidebar plugins. The base class for all sidebar plugins.
""" """

View File

@ -172,7 +172,7 @@ def model_contains(model, data):
# wrapper classes to provide object specific listing in the ListView # wrapper classes to provide object specific listing in the ListView
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ClipWrapper(object): class ClipWrapper:
UNAVAILABLE_ICON = 'dialog-error' UNAVAILABLE_ICON = 'dialog-error'
def __init__(self, dbstate, obj): def __init__(self, dbstate, obj):
@ -849,7 +849,7 @@ class ClipRepositoryLink(ClipHandleWrapper):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ClipDropList(object): class ClipDropList:
DROP_TARGETS = [DdTargets.LINK_LIST] DROP_TARGETS = [DdTargets.LINK_LIST]
DRAG_TARGET = None DRAG_TARGET = None
@ -941,7 +941,7 @@ class ClipboardListModel(Gtk.ListStore):
# ClipboardListView class # ClipboardListView class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ClipboardListView(object): class ClipboardListView:
LOCAL_DRAG_TYPE = 'MY_TREE_MODEL_ROW' LOCAL_DRAG_TYPE = 'MY_TREE_MODEL_ROW'
LOCAL_DRAG_ATOM_TYPE = Gdk.atom_intern(LOCAL_DRAG_TYPE, False) LOCAL_DRAG_ATOM_TYPE = Gdk.atom_intern(LOCAL_DRAG_TYPE, False)

View File

@ -38,7 +38,7 @@ from gramps.gen.utils.callman import CallbackManager
# DbGUIElement class # DbGUIElement class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DbGUIElement(object): class DbGUIElement:
""" """
Most interaction with the DB should be done via the callman attribute. Most interaction with the DB should be done via the callman attribute.
On initialization, the method :meth:`_connect_db_signals` is called. On initialization, the method :meth:`_connect_db_signals` is called.

View File

@ -105,7 +105,7 @@ class _DdType:
""" """
return [self.atom_drag_type, self.target_flags, self.app_id] return [self.atom_drag_type, self.target_flags, self.app_id]
class _DdTargets(object): class _DdTargets:
"""A single class that manages all the drag and drop targets.""" """A single class that manages all the drag and drop targets."""
_instance = None # Singleton instance _instance = None # Singleton instance

View File

@ -52,7 +52,7 @@ try:
except: except:
ICON = None ICON = None
class SaveDialog(object): class SaveDialog:
def __init__(self, msg1, msg2, task1, task2, parent=None): def __init__(self, msg1, msg2, task1, task2, parent=None):
self.xml = Glade(toplevel='savedialog') self.xml = Glade(toplevel='savedialog')
@ -83,7 +83,7 @@ class SaveDialog(object):
config.set('interface.dont-ask', self.dontask.get_active()) config.set('interface.dont-ask', self.dontask.get_active())
self.top.destroy() self.top.destroy()
class QuestionDialog(object): class QuestionDialog:
def __init__(self, msg1, msg2, label, task, parent=None): def __init__(self, msg1, msg2, label, task, parent=None):
self.xml = Glade(toplevel='questiondialog') self.xml = Glade(toplevel='questiondialog')
@ -115,7 +115,7 @@ def on_activate_link(label, uri):
display_url(uri) display_url(uri)
return True return True
class QuestionDialog2(object): class QuestionDialog2:
def __init__(self, msg1, msg2, label_msg1, label_msg2, parent=None): def __init__(self, msg1, msg2, label_msg1, label_msg2, parent=None):
self.xml = Glade(toplevel='questiondialog') self.xml = Glade(toplevel='questiondialog')
@ -147,7 +147,7 @@ class QuestionDialog2(object):
self.top.destroy() self.top.destroy()
return (response == Gtk.ResponseType.ACCEPT) return (response == Gtk.ResponseType.ACCEPT)
class OptionDialog(object): class OptionDialog:
def __init__(self, msg1, msg2, btnmsg1, task1, btnmsg2, task2, parent=None): def __init__(self, msg1, msg2, btnmsg1, task1, btnmsg2, task2, parent=None):
self.xml = Glade(toplevel='optiondialog') self.xml = Glade(toplevel='optiondialog')
@ -252,7 +252,7 @@ class OkDialog(Gtk.MessageDialog):
self.run() self.run()
self.destroy() self.destroy()
class InfoDialog(object): class InfoDialog:
""" """
Non modal dialog to show selectable info in a scrolled window Non modal dialog to show selectable info in a scrolled window
""" """
@ -285,7 +285,7 @@ class InfoDialog(object):
#no matter how it finishes, destroy dialog #no matter how it finishes, destroy dialog
dialog.destroy() dialog.destroy()
class MissingMediaDialog(object): class MissingMediaDialog:
def __init__(self, msg1, msg2, task1, task2, task3, parent=None): def __init__(self, msg1, msg2, task1, task2, task3, parent=None):
self.xml = Glade(toplevel='missmediadialog') self.xml = Glade(toplevel='missmediadialog')
@ -339,7 +339,7 @@ class MissingMediaDialog(object):
parent=self.top) parent=self.top)
return True return True
class MultiSelectDialog(object): class MultiSelectDialog:
def __init__(self, msg1_func, msg2_func, items, lookup, def __init__(self, msg1_func, msg2_func, items, lookup,
cancel_func=None, no_func=None, yes_func=None, cancel_func=None, no_func=None, yes_func=None,
parent=None): parent=None):
@ -412,7 +412,7 @@ class MultiSelectDialog(object):
parent=self.top) parent=self.top)
return True return True
class MessageHideDialog(object): class MessageHideDialog:
def __init__(self, title, message, key, parent=None): def __init__(self, title, message, key, parent=None):
self.xml = Glade(toplevel='hidedialog') self.xml = Glade(toplevel='hidedialog')

View File

@ -250,7 +250,7 @@ _RCT_BTM = '</menu></menu></menubar></ui>'
from gramps.gen.recentfiles import RecentFiles from gramps.gen.recentfiles import RecentFiles
class RecentDocsMenu(object): class RecentDocsMenu:
def __init__(self, uistate, state, fileopen): def __init__(self, uistate, state, fileopen):
self.action_group = Gtk.ActionGroup(name='RecentFiles') self.action_group = Gtk.ActionGroup(name='RecentFiles')
self.active = DISABLED self.active = DISABLED

View File

@ -345,7 +345,7 @@ class EditCitation(EditPrimary):
cmp_obj = self.empty_object() cmp_obj = self.empty_object()
return cmp_obj.serialize(True)[1:] != self.obj.serialize()[1:] return cmp_obj.serialize(True)[1:] != self.obj.serialize()[1:]
class DeleteCitationQuery(object): class DeleteCitationQuery:
def __init__(self, dbstate, uistate, citation, the_lists): def __init__(self, dbstate, uistate, citation, the_lists):
self.citation = citation self.citation = citation
self.db = dbstate.db self.db = dbstate.db

View File

@ -307,7 +307,7 @@ class EditEvent(EditPrimary):
# Delete Query class # Delete Query class
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DeleteEventQuery(object): class DeleteEventQuery:
def __init__(self, dbstate, uistate, event, person_list, family_list): def __init__(self, dbstate, uistate, event, person_list, family_list):
self.event = event self.event = event
self.db = dbstate.db self.db = dbstate.db

View File

@ -316,7 +316,7 @@ class ChildEmbedList(EmbeddedList):
else: else:
return name return name
class FastMaleFilter(object): class FastMaleFilter:
def __init__(self, db): def __init__(self, db):
self.db = db self.db = db
@ -325,7 +325,7 @@ class FastMaleFilter(object):
value = self.db.get_raw_person_data(handle) value = self.db.get_raw_person_data(handle)
return value[2] == Person.MALE return value[2] == Person.MALE
class FastFemaleFilter(object): class FastFemaleFilter:
def __init__(self, db): def __init__(self, db):
self.db = db self.db = db

Some files were not shown because too many files have changed in this diff Show More