Skip to content

Commit

Permalink
add newlines to napoleon docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
xflr6 committed Dec 23, 2020
1 parent f317157 commit 8fe3f02
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
10 changes: 8 additions & 2 deletions graphviz/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ def render(engine, format, filepath, renderer=None, formatter=None, quiet=False)
renderer: The output renderer used for rendering (``'cairo'``, ``'gd'``, ...).
formatter: The output formatter used for rendering (``'cairo'``, ``'gd'``, ...).
quiet (bool): Suppress ``stderr`` output from the layout subprocess.
Returns:
The (possibly relative) path of the rendered file.
Raises:
ValueError: If ``engine``, ``format``, ``renderer``, or ``formatter`` are not known.
graphviz.RequiredArgumentError: If ``formatter`` is given but ``renderer`` is None.
Expand Down Expand Up @@ -230,8 +232,10 @@ def pipe(engine, format, data, renderer=None, formatter=None, quiet=False):
renderer: The output renderer used for rendering (``'cairo'``, ``'gd'``, ...).
formatter: The output formatter used for rendering (``'cairo'``, ``'gd'``, ...).
quiet (bool): Suppress ``stderr`` output from the layout subprocess.
Returns:
Binary (encoded) stdout of the layout command.
Raises:
ValueError: If ``engine``, ``format``, ``renderer``, or ``formatter`` are not known.
graphviz.RequiredArgumentError: If ``formatter`` is given but ``renderer`` is None.
Expand Down Expand Up @@ -294,8 +298,9 @@ def version():
Note:
Ignores the ``~dev.<YYYYmmdd.HHMM>`` portion of development versions.
See also Graphviz Release version entry format:
https://gitlab.com/graphviz/graphviz/-/blob/f94e91ba819cef51a4b9dcb2d76153684d06a913/gen_version.py#L17-20
See also:
Graphviz Release version entry format
https://gitlab.com/graphviz/graphviz/-/blob/f94e91ba819cef51a4b9dcb2d76153684d06a913/gen_version.py#L17-20
"""
cmd = ['dot', '-V']
out, _ = run(cmd, check=True, encoding='ascii',
Expand Down Expand Up @@ -326,6 +331,7 @@ def view(filepath, quiet=False):
filepath: Path to the file to open in viewer.
quiet (bool): Suppress ``stderr`` output from the viewer process
(ineffective on Windows).
Raises:
RuntimeError: If the current platform is not supported.
Expand Down
7 changes: 7 additions & 0 deletions graphviz/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ def pipe(self, format=None, renderer=None, formatter=None, quiet=False):
renderer: The output renderer used for rendering (``'cairo'``, ``'gd'``, ...).
formatter: The output formatter used for rendering (``'cairo'``, ``'gd'``, ...).
quiet (bool): Suppress ``stderr`` output from the layout subprocess.
Returns:
Binary (encoded) stdout of the layout command.
Raises:
ValueError: If ``format``, ``renderer``, or ``formatter`` are not known.
graphviz.RequiredArgumentError: If ``formatter`` is given but ``renderer`` is None.
Expand Down Expand Up @@ -180,6 +182,7 @@ def save(self, filename=None, directory=None):
Args:
filename: Filename for saving the source (defaults to ``name`` + ``'.gv'``)
directory: (Sub)directory for source saving and rendering.
Returns:
The (possibly relative) path of the saved source file.
"""
Expand Down Expand Up @@ -217,8 +220,10 @@ def render(self, filename=None, directory=None, view=False, cleanup=False,
quiet (bool): Suppress ``stderr`` output from the layout subprocess.
quiet_view (bool): Suppress ``stderr`` output from the viewer process
(implies ``view=True``, ineffective on Windows).
Returns:
The (possibly relative) path of the rendered file.
Raises:
ValueError: If ``format``, ``renderer``, or ``formatter`` are not known.
graphviz.RequiredArgumentError: If ``formatter`` is given but ``renderer`` is None.
Expand Down Expand Up @@ -259,8 +264,10 @@ def view(self, filename=None, directory=None, cleanup=False,
quiet (bool): Suppress ``stderr`` output from the layout subprocess.
quiet_view (bool): Suppress ``stderr`` output from the viewer process
(ineffective on Windows).
Returns:
The (possibly relative) path of the rendered file.
Raises:
graphviz.ExecutableNotFound: If the Graphviz executable is not found.
subprocess.CalledProcessError: If the exit status is non-zero.
Expand Down
2 changes: 2 additions & 0 deletions graphviz/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def escape(s):
Args:
s: String in which backslashes and ``'<...>'`` should be treated as literal.
Raises:
TypeError: If ``s`` is not a ``str`` on Python 3, or a ``str``/``unicode`` on Python 2.
Expand Down Expand Up @@ -178,6 +179,7 @@ def nohtml(s):
Args:
s: String in which leading ``'<'`` and trailing ``'>'`` should be treated as literal.
Raises:
TypeError: If ``s`` is not a ``str`` on Python 3, or a ``str``/``unicode`` on Python 2.
Expand Down

0 comments on commit 8fe3f02

Please sign in to comment.