docstring & documentation fixes

This commit is contained in:
Daniel Schadt 2016-08-03 18:06:28 +02:00
parent afa7494c5f
commit 71102cceb0
3 changed files with 28 additions and 9 deletions

View File

@ -215,11 +215,22 @@ The index of the download to delete.
[[download-open]] [[download-open]]
=== download-open === download-open
Syntax: +:download-open ['cmdline']+
Open the last/[count]th download. Open the last/[count]th download.
If no specific command is given, this will use the system's default application to open the file.
==== positional arguments
* +'cmdline'+: The command which should be used to open the file. A `{}` is expanded to the temporary file name.
==== count ==== count
The index of the download to open. The index of the download to open.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
[[download-remove]] [[download-remove]]
=== download-remove === download-remove
Syntax: +:download-remove [*--all*]+ Syntax: +:download-remove [*--all*]+
@ -1172,10 +1183,14 @@ Syntax: +:prompt-open-download ['cmdline']+
Immediately open a download. Immediately open a download.
==== positional arguments If no specific command is given, this will use the system's default application to open the file.
* +'cmdline'+: The command line string to execute. The default will use the system's application to open the file, depending on
the filetype.
==== positional arguments
* +'cmdline'+: The command which should be used to open the file. A `{}` is expanded to the temporary file name.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
[[prompt-yes]] [[prompt-yes]]
=== prompt-yes === prompt-yes

View File

@ -1058,9 +1058,12 @@ class DownloadManager(QAbstractListModel):
def download_open(self, cmdline: str=None, count=0): def download_open(self, cmdline: str=None, count=0):
"""Open the last/[count]th download. """Open the last/[count]th download.
If no specific command is given, this will use the system's default
application to open the file.
Args: Args:
cmdline: The command which should be used to open the file. A {} as cmdline: The command which should be used to open the file. A `{}`
argument will be replaced by the download's filename. is expanded to the temporary file name.
count: The index of the download to open. count: The index of the download to open.
""" """
try: try:

View File

@ -316,11 +316,12 @@ class Prompter(QObject):
def prompt_open_download(self, cmdline: str=None): def prompt_open_download(self, cmdline: str=None):
"""Immediately open a download. """Immediately open a download.
If no specific command is given, this will use the system's default
application to open the file.
Args: Args:
cmdline: The command line string to execute. The default will use cmdline: The command which should be used to open the file. A `{}`
the system's application to open the file, depending on is expanded to the temporary file name.
the filetype. A `{}` is expanded to the temporary file
name.
""" """
if self._question.mode != usertypes.PromptMode.download: if self._question.mode != usertypes.PromptMode.download:
# We just ignore this if we don't have a download question. # We just ignore this if we don't have a download question.