0002832: Somes modules still use Relib reference on docstring

patch by romjerome

fixed wrong doc string in srcref.py

svn: r12949
This commit is contained in:
Raphael Ackermann 2009-08-10 19:46:24 +00:00
parent f6f1cdf05c
commit 5ac76d658b
3 changed files with 8 additions and 8 deletions

View File

@ -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.

View File

@ -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()

View File

@ -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)