An open API service indexing awesome lists of open source software.

https://github.com/sphinx-contrib/prettyspecialmethods

Shows special/magic methods in sphinx docs as the python syntax that invokes them
https://github.com/sphinx-contrib/prettyspecialmethods

magic-methods python sphinx sphinx-extension sphinxcontrib

Last synced: 7 days ago
JSON representation

Shows special/magic methods in sphinx docs as the python syntax that invokes them

Awesome Lists containing this project

README

        

==================================
sphinxcontrib-prettyspecialmethods
==================================

|badge-pypi| |badge-travis|

.. |badge-pypi| image:: https://badgen.net/pypi/v/sphinxcontrib-prettyspecialmethods
:target: https://pypi.org/project/sphinxcontrib-prettyspecialmethods

.. |badge-travis| image:: https://travis-ci.org/sphinx-contrib/prettyspecialmethods.svg?branch=master
:target: https://travis-ci.org/sphinx-contrib/prettyspecialmethods

Shows special methods as the python syntax that invokes them

Overview
--------

This module renders docs like

.. code-block:: rst

.. method:: __add__(other)
Docstring

as

self + other
Docstring

After installing this module, add the following to your `conf.py` to enable it

.. code-block:: python

extensions = [
... # your other extensions
'sphinxcontrib.prettyspecialmethods',
]

Links
-----

- Source: https://github.com/sphinx-contrib/prettyspecialmethods
- Bugs: https://github.com/sphinx-contrib/prettyspecialmethods/issues