Skip to content

Commit

Permalink
normalize documentation whitespace and fix typos (#206)
Browse files Browse the repository at this point in the history
* docs: remove trailing whitespace

* docs: fix spelling typos

* docs: add comma after `e.g.`
  • Loading branch information
mathstuf committed Oct 15, 2023
1 parent 1760930 commit 5877f14
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/attributes.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Attributes
----------

To directly add DOT_ ``att_stmt`` attribute statements,
To directly add DOT_ ``att_stmt`` attribute statements,
call the :meth:`~.Graph.attr` method
of the :class:`.Graph` or :class:`.Digraph` instance
with the wanted target as first argument and the attributes as keyword args.
Expand Down
4 changes: 2 additions & 2 deletions docs/basic_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Check the generated DOT source code:

Use the :meth:`~.Graph.render` method to save the DOT source code
and render it with the default ``dot`` `layout engine <DOT layouts_>`_
(see :ref:`below <engines>` for using other layout engines).
(see :ref:`below <engines>` for using other layout engines).

.. doctest::

Expand Down Expand Up @@ -97,4 +97,4 @@ for the rendered file type.
If you need to render arbitrary strings literally (e.g. from user input),
consider wrapping them with the :func:`graphviz.escape` function first.
See the sections on :ref:`backslash-escapes`
and :ref:`quoting-and-html-like-labels` below for details.
and :ref:`quoting-and-html-like-labels` below for details.
4 changes: 2 additions & 2 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Install in a venv_ in development mode (includes all ``extras_require``):

.. hint::

alteratively: ``pip install -e .[dev,test,docs]``
alternatively: ``pip install -e .[dev,test,docs]``
(same as ``pip install -r requirements.txt``)


Expand Down Expand Up @@ -120,7 +120,7 @@ Use ``help()`` in the REPL to shows/structure methods and attributes in dependen
In the above, cooperative multiple inheritance classes reveal their
(diamond) MRO structure and methods are shown in **method resolution order** (MRO),
which should be an extension of their dependency relation...

TLDR; you might find this presentation helps to follow the implementation.


Expand Down
2 changes: 1 addition & 1 deletion docs/escapes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Graphviz_ layout `engines <DOT layouts_>`_ support a number of
*centered*, *left*-justified, *right*-justified)
and ``\N``, ``\G``, ``\L``
(expanded to the current *node* name, *graph* name, object *label*).
To be able to use them from this library (e.g. for labels),
To be able to use them from this library (e.g., for labels),
backslashes in strings are (mostly) passed on **as is**.

.. attention::
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Examples
.. tip::

The following code examples are included in the ``examples/`` directory of the
`source repository/distribution <examples directory_>`_.
`source repository/distribution <examples directory_>`_.

.. note::

Expand All @@ -16,7 +16,7 @@ Examples
.. include:: _links.rst


hello.py
hello.py
--------

.. literalinclude:: ../examples/hello.py
Expand Down
4 changes: 2 additions & 2 deletions docs/existing_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Existing files
--------------

To directly render an existing DOT_ source file (e.g. created with other tools),
you can use the :func:`graphviz.render` function.
you can use the :func:`graphviz.render` function.

.. doctest::

Expand Down Expand Up @@ -43,7 +43,7 @@ Call ``.save(skip_existing=False)`` if you want to re-write the loaded source.
:meth:`.Source.save`, :meth:`.Source.render`, and :meth:`.Source.view`,
wrote the content read into source back into the file.
It was advised to use :func:`graphviz.render` and :func:`graphviz.view`
to directly work on files if the superflous saving needed to be avoided.
to directly work on files if the superfluous saving needed to be avoided.


.. include:: _links.rst
2 changes: 1 addition & 1 deletion docs/formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Formats
-------

To use a different `output file format <DOT outputs_>`_ than the default PDF,
you canuse the ``format`` argument when creating your :class:`.Graph`
you can use the ``format`` argument when creating your :class:`.Graph`
or :class:`.Digraph` object:

.. doctest::
Expand Down
4 changes: 2 additions & 2 deletions docs/integration_with_viewers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Integration with viewers
------------------------

On platforms such as Windows, viewer programs opened by :meth:`~.Graph.render`
with ``view=True`` (or eqivalently with the :meth:`~.Graph.view` shortcut-method)
with ``view=True`` (or equivalently with the :meth:`~.Graph.view` shortcut-method)
might **lock** the (PDF, PNG, etc.) file for as long as the viewer is open
(blocking re-rendering it with a ``Permission denied`` error).

Expand Down Expand Up @@ -37,7 +37,7 @@ Other options:

- use a viewer that `support live updates <live viewer updates_>`_

- use the `Jupyter notebook`_ or `Qt Console <Jupyter Qt Console_>`_
- use the `Jupyter notebook`_ or `Qt Console <Jupyter Qt Console_>`_
(display the current version of the rendered graph
in repeated add/render/view cycles)

Expand Down
2 changes: 1 addition & 1 deletion docs/piped_output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ of your :class:`.Graph` or :class:`.Digraph` object:
Because :meth:`~.Graph.pipe` returns the raw ``stdout``
from the layout subprocess by default (:class:`bytes`),
you usually want to decode the return value
when piping into formats like ``'svg'`` or ``'plain'``,
when piping into formats like ``'svg'`` or ``'plain'``,

.. caution::

Expand Down
2 changes: 1 addition & 1 deletion docs/styling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Styling
-------

Use the ``graph_attr``, ``node_attr``, and ``edge_attr`` arguments
of the :class:`.Graph` and :class:`.Digraph` constuctors to change
of the :class:`.Graph` and :class:`.Digraph` constructors to change
the default `attributes <DOT attrs_>`_ for your graph, nodes, and edges.

.. doctest::
Expand Down
2 changes: 1 addition & 1 deletion docs/unflatten.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Unflatten
---------

To prepocess the DOT_ source of a :class:`.Graph` or :class:`.Digraph` with
To prerpocess the DOT_ source of a :class:`.Graph` or :class:`.Digraph` with
the `unflatten <DOT unflatten>`_ preprocessor
(`manpage <DOT unflatten_>`_, `PDF <DOT unflatten_pdf_>`_),
use the :meth:`~.Graph.unflatten` method.
Expand Down

0 comments on commit 5877f14

Please sign in to comment.