From 5ac76d658bc9d89581e64e9bc31d65a8a5aeb180 Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Mon, 10 Aug 2009 19:46:24 +0000 Subject: [PATCH] 0002832: Somes modules still use Relib reference on docstring patch by romjerome fixed wrong doc string in srcref.py svn: r12949 --- src/ReportBase/_Bibliography.py | 12 ++++++------ src/ReportBase/_Endnotes.py | 2 +- src/gen/lib/srcref.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ReportBase/_Bibliography.py b/src/ReportBase/_Bibliography.py index f1b5b64cb..480a815da 100644 --- a/src/ReportBase/_Bibliography.py +++ b/src/ReportBase/_Bibliography.py @@ -24,7 +24,7 @@ Contain and organize bibliographic information. """ import string import math -from gen.lib import SourceRef as SourceRef +from gen.lib import SourceRef class Citation(object): """ @@ -60,7 +60,7 @@ class Citation(object): List all the references to this citation. @return: a list of references - @rtype: list of L{Relib.SourceRef} objects + @rtype: list of L{gen.lib.srcref} objects """ return self.__ref_list @@ -70,7 +70,7 @@ class Citation(object): add another one. @param source_ref: Source Reference - @type source_ref: L{Relib.SourceRef} + @type source_ref: L{gen.lib.srcref} @return: The key of the added reference among all the references. @rtype: char """ @@ -84,12 +84,12 @@ class Citation(object): last_letter = string.ascii_lowercase[ ref_count % letter_count ] key = "" # Calculate prek number of digits. - number_of_letters = int(math.log(float(ref_count),float(letter_count)))+1 + number_of_letters = int(math.log(float(ref_count), float(letter_count)))+1 # Exclude index for number_of_letters-1 for n in range(1, number_of_letters-1): ref_count = ref_count - pow(letter_count, n) # Adjust number_of_letters for new index - number_of_letters = int(math.log(float(ref_count),float(letter_count))) +1 + number_of_letters = int(math.log(float(ref_count), float(letter_count))) +1 for n in range(1, number_of_letters): x_ref_count = x_ref_count - pow(letter_count, n) for letter in range(1, number_of_letters): @@ -137,7 +137,7 @@ class Bibliography(object): add another one. @param source_ref: Source Reference - @type source_ref: L{Relib.SourceRef} + @type source_ref: L{gen.lib.srcref} @return: A tuple containing the index of the source among all the sources and the key of the reference among all the references. If there is no reference information, the second element will be None. diff --git a/src/ReportBase/_Endnotes.py b/src/ReportBase/_Endnotes.py index 4ab2de32e..7f61be804 100644 --- a/src/ReportBase/_Endnotes.py +++ b/src/ReportBase/_Endnotes.py @@ -63,7 +63,7 @@ def cite_source(bibliography, obj): @param bibliography: The bibliography to contain the citations. @type bibliography: L{Bibliography} @param obj: An object with source references. - @type obj: L{Relib.SourceBase} + @type obj: L{gen.lib.srcbase} """ txt = "" slist = obj.get_source_references() diff --git a/src/gen/lib/srcref.py b/src/gen/lib/srcref.py index d6bb62911..60d41918c 100644 --- a/src/gen/lib/srcref.py +++ b/src/gen/lib/srcref.py @@ -134,6 +134,6 @@ class SourceRef(SecondaryObject, DateBase, PrivacyBase, NoteBase, RefBase): return self.page def are_equal(self, other): - """Deprecated function - use are_equal instead.""" + """Deprecated function - use is_equal instead.""" warn( "Use is_equal instead of are_equal", DeprecationWarning, 2) return self.is_equal(other)