Skip to content

Refactor python docstrings to string literals #216

@anthony-santana

Description

@anthony-santana

We currently use the google style convention for python documentation. Up until this point, however, we've been manually formatting a single string with end-lines. We should refactor all relevant documentation to use string literals, such that the documentation is more readable and easier to maintain/debug. Example from py_kernel_builder

Current docstring

                      "The data-type representing a qubit argument to a "
                      ":class:`Kernel` function.\n"
                      "\n.. code-block:: python\n\n"
                      "  # Example:\n"
                      "  kernel, qubit = cudaq.make_kernel(cudaq.qubit)\n"

Reformatted docstring (semi-pseudocode)

                      """
                      The data-type representing a qubit argument to a 
                      :class:`Kernel` function.

                      .. code-block:: python
                         # Example: 
                         kernel, qubit = cudaq.make_kernel(cudaq.qubit)
                      """

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions