Fix some docstrings

This commit is contained in:
Andrew Resch 2009-08-13 05:02:39 +00:00
parent 74ed19b5f2
commit 567a42b0ec
4 changed files with 13 additions and 12 deletions

View File

@ -57,7 +57,7 @@ class TorrentMetadata(object):
"""
This class is used to create .torrent files.
*** Usage ***
** Usage **
>>> t = TorrentMetadata()
>>> t.data_path = "/tmp/torrent"
@ -254,6 +254,7 @@ class TorrentMetadata(object):
def set_piece_size(self, size):
"""
:param size: the desired piece size in bytes
:type size: int
:raises InvalidPieceSize: if the piece size is not a multiple of 16KiB

View File

@ -128,9 +128,9 @@ def build_menu_radio_list(value_list, callback, pref_value=None,
def show_other_dialog(header, type_str, image_stockid=None, image_filename=None, default=0):
"""
Shows a dialog with :param:`header` as the header text and :param:`type_str`
Shows a dialog with `header` as the header text and `type_str`
as the type text. The type of spinbutton (int or float) is determined by
:param:`default`s type.
`default` type.
:param header: str, the header label text
:param type_str: str, the type label text, what comes after the spinbutton
@ -138,11 +138,11 @@ def show_other_dialog(header, type_str, image_stockid=None, image_filename=None,
:param image_filename: str, filename of icon in pixmaps folder
:param default: the default value in the spinbutton
:returns: None, int or float from spinbutton depending on :param:`default`.
:returns: None, int or float from spinbutton depending on `default`.
None is returned if the user clicks on Cancel.
:rtype: None, int or float
:raises TypeError: if :param:`default` is not of type int or float
:raises TypeError: if `default` is not of type int or float
"""
if type(default) != int and type(default) != float:
@ -213,7 +213,7 @@ def get_deluge_icon():
Returns the deluge icon for use in setting a dialogs icon. It will first
attempt to get the icon from the theme and will fallback to using an image
that is distributed with the package.
"""
if deluge.common.windows_check():
return get_logo(32)
@ -223,4 +223,3 @@ def get_deluge_icon():
return icon_theme.load_icon("deluge", 64, 0)
except:
return get_logo(64)

View File

@ -44,10 +44,11 @@ class RemoveTorrentDialog(object):
"""
This class is used to create and show a Remove Torrent Dialog.
:param torrent_ids: a list of torrent_ids to remove
:param torrent_ids: the torrent_ids to remove
:type torrent_ids: list of torrent_ids
:raises TypeError: if :param:`torrent_id` is not a sequence type
:raises ValueError: if :param:`torrent_id` contains no torrent_ids or is None
:raises TypeError: if `torrent_id` is not a sequence type
:raises ValueError: if `torrent_id` contains no torrent_ids or is None
"""
def __init__(self, torrent_ids):

View File

@ -37,7 +37,7 @@ master_doc = 'index'
# General substitutions.
project = 'Deluge'
copyright = '2008, Andrew Resch'
copyright = '2008-2009, Deluge Team'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
@ -159,7 +159,7 @@ htmlhelp_basename = 'delugedoc'
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('index', 'deluge.tex', 'deluge Documentation',
'Andrew Resch', 'manual'),
'Deluge Team', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of