mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
Fix some docstrings
This commit is contained in:
parent
74ed19b5f2
commit
567a42b0ec
4 changed files with 13 additions and 12 deletions
|
@ -57,7 +57,7 @@ class TorrentMetadata(object):
|
||||||
"""
|
"""
|
||||||
This class is used to create .torrent files.
|
This class is used to create .torrent files.
|
||||||
|
|
||||||
*** Usage ***
|
** Usage **
|
||||||
|
|
||||||
>>> t = TorrentMetadata()
|
>>> t = TorrentMetadata()
|
||||||
>>> t.data_path = "/tmp/torrent"
|
>>> t.data_path = "/tmp/torrent"
|
||||||
|
@ -254,6 +254,7 @@ class TorrentMetadata(object):
|
||||||
def set_piece_size(self, size):
|
def set_piece_size(self, size):
|
||||||
"""
|
"""
|
||||||
:param size: the desired piece size in bytes
|
:param size: the desired piece size in bytes
|
||||||
|
:type size: int
|
||||||
|
|
||||||
:raises InvalidPieceSize: if the piece size is not a multiple of 16KiB
|
:raises InvalidPieceSize: if the piece size is not a multiple of 16KiB
|
||||||
|
|
||||||
|
|
|
@ -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):
|
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
|
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 header: str, the header label text
|
||||||
:param type_str: str, the type label text, what comes after the spinbutton
|
: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 image_filename: str, filename of icon in pixmaps folder
|
||||||
:param default: the default value in the spinbutton
|
: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.
|
None is returned if the user clicks on Cancel.
|
||||||
:rtype: None, int or float
|
: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:
|
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
|
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
|
attempt to get the icon from the theme and will fallback to using an image
|
||||||
that is distributed with the package.
|
that is distributed with the package.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if deluge.common.windows_check():
|
if deluge.common.windows_check():
|
||||||
return get_logo(32)
|
return get_logo(32)
|
||||||
|
@ -223,4 +223,3 @@ def get_deluge_icon():
|
||||||
return icon_theme.load_icon("deluge", 64, 0)
|
return icon_theme.load_icon("deluge", 64, 0)
|
||||||
except:
|
except:
|
||||||
return get_logo(64)
|
return get_logo(64)
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,11 @@ class RemoveTorrentDialog(object):
|
||||||
"""
|
"""
|
||||||
This class is used to create and show a Remove Torrent Dialog.
|
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 TypeError: if `torrent_id` is not a sequence type
|
||||||
:raises ValueError: if :param:`torrent_id` contains no torrent_ids or is None
|
:raises ValueError: if `torrent_id` contains no torrent_ids or is None
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, torrent_ids):
|
def __init__(self, torrent_ids):
|
||||||
|
|
|
@ -37,7 +37,7 @@ master_doc = 'index'
|
||||||
|
|
||||||
# General substitutions.
|
# General substitutions.
|
||||||
project = 'Deluge'
|
project = 'Deluge'
|
||||||
copyright = '2008, Andrew Resch'
|
copyright = '2008-2009, Deluge Team'
|
||||||
|
|
||||||
# The default replacements for |version| and |release|, also used in various
|
# The default replacements for |version| and |release|, also used in various
|
||||||
# other places throughout the built documents.
|
# other places throughout the built documents.
|
||||||
|
@ -159,7 +159,7 @@ htmlhelp_basename = 'delugedoc'
|
||||||
# (source start file, target name, title, author, document class [howto/manual]).
|
# (source start file, target name, title, author, document class [howto/manual]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'deluge.tex', 'deluge Documentation',
|
('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
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue