Skip to main content

A decorator used to inherit method documentation from parent classes.

Project description

A decorator used to inherit method documentation from parent classes.

Badges

https://img.shields.io/travis/kavdev/python-doc-inherit/master.svg?style=flat-square https://img.shields.io/codecov/c/github/kavdev/python-doc-inherit/master.svg?style=flat-square https://img.shields.io/requires/github/kavdev/python-doc-inherit.svg?style=flat-square https://img.shields.io/codacy/75dbe2685efe47c3aa203a53154c9e7e.svg?style=flat-square https://img.shields.io/pypi/v/python-doc-inherit.svg?style=flat-square https://img.shields.io/pypi/dw/python-doc-inherit.svg?style=flat-square https://img.shields.io/github/issues/kavdev/python-doc-inherit.svg?style=flat-square https://img.shields.io/github/license/kavdev/python-doc-inherit.svg?style=flat-square

Usage

Install python-doc-inherit:

pip install python-doc-inherit

Put it to use:

from doc_inherit import method_doc_inherit

class Foo(object):

    def foo(self):
        """Frobber"""

        pass

class Bar(Foo):

    @method_doc_inherit
    def foo(self):
        pass

Now, Bar.foo.__doc__ == Bar().foo.__doc__ == Foo.foo.__doc__ == "Frobber"

Running the Tests

pip install -r requirements/test.txt
./runtests.py

Changes

0.1.1 (2016-06-18)

  • small fixes

0.1.0 (2016-06-18)

  • Initial release

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page