Fix docstrings formatting

Fix warnings/errors reported by Sphinx
This commit is contained in:
Marek Marczykowski-Górecki 2017-06-27 02:57:50 +02:00
parent e7f717ec3d
commit f393ce62dc
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
6 changed files with 19 additions and 16 deletions

View File

@ -325,8 +325,8 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
setter. Can raise QubesValueError if the value is invalid. setter. Can raise QubesValueError if the value is invalid.
:param untrusted_newvalue: value to be validated :param untrusted_newvalue: value to be validated
:return sanitized value :return: sanitized value
:raises qubes.exc.QubesValueError :raises: qubes.exc.QubesValueError
''' '''
# do not treat type='str' as sufficient validation # do not treat type='str' as sufficient validation
if self.type is not None and self.type is not str: if self.type is not None and self.type is not str:

View File

@ -119,6 +119,7 @@ class BackupHeader(object):
:param untrusted_header_text: header content :param untrusted_header_text: header content
:type untrusted_header_text: basestring :type untrusted_header_text: basestring
.. warning:: .. warning::
This function may be exposed to not yet verified header, This function may be exposed to not yet verified header,
so is security critical. so is security critical.

View File

@ -249,7 +249,7 @@ class OptionsCheckVisitor(docutils.nodes.SparseNodeVisitor):
While the documentation talks about a While the documentation talks about a
'SparseNodeVisitor.depart_document()' function, this function does 'SparseNodeVisitor.depart_document()' function, this function does
not exists. (For details see implementation of not exists. (For details see implementation of
:py:method:`NodeVisitor.dispatch_departure()`) So we need to :py:meth:`NodeVisitor.dispatch_departure()`) So we need to
manually call this. manually call this.
''' '''
if ignored_options is None: if ignored_options is None:
@ -316,7 +316,7 @@ class CommandCheckVisitor(docutils.nodes.SparseNodeVisitor):
While the documentation talks about a While the documentation talks about a
'SparseNodeVisitor.depart_document()' function, this function does 'SparseNodeVisitor.depart_document()' function, this function does
not exists. (For details see implementation of not exists. (For details see implementation of
:py:method:`NodeVisitor.dispatch_departure()`) So we need to :py:meth:`NodeVisitor.dispatch_departure()`) So we need to
manually call this. manually call this.
''' '''
if self.sub_commands: if self.sub_commands:

View File

@ -304,10 +304,12 @@ class QubesArgumentParser(argparse.ArgumentParser):
:param bool want_force_root: add ``--force-root`` option :param bool want_force_root: add ``--force-root`` option
:param mixed vmname_nargs: The number of ``VMNAME`` arguments that should be :param mixed vmname_nargs: The number of ``VMNAME`` arguments that should be
consumed. Values include: consumed. Values include:
- N (an integer) consumes N arguments (and produces a list) - N (an integer) consumes N arguments (and produces a list)
- '?' consumes zero or one arguments - '?' consumes zero or one arguments
- '*' consumes zero or more arguments (and produces a list) - '*' consumes zero or more arguments (and produces a list)
- '+' consumes one or more arguments (and produces a list) - '+' consumes one or more arguments (and produces a list)
*kwargs* are passed to :py:class:`argparser.ArgumentParser`. *kwargs* are passed to :py:class:`argparser.ArgumentParser`.
Currenty supported options: Currenty supported options:

View File

@ -578,7 +578,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
@property @property
def block_devices(self): def block_devices(self):
''' Return all :py:class:`qubes.storage.BlockDevice`s for current domain ''' Return all :py:class:`qubes.storage.BlockDevice` for current domain
for serialization in the libvirt XML template as <disk>. for serialization in the libvirt XML template as <disk>.
''' '''
for v in self.volumes.values(): for v in self.volumes.values():