Skip to main content

A decorator to automatically detect mismatch when overriding a method.

Project description

overrides
========

.. image:: https://api.travis-ci.org/drorasaf/overrides.svg?branch=python3_support
:target: https://travis-ci.org/drorasaf/overrides

.. image:: https://coveralls.io/repos/drorasaf/overrides/badge.svg?branch=python3_support
:target: https://coveralls.io/r/drorasaf/overrides

.. image:: https://img.shields.io/pypi/v/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides

.. image:: https://img.shields.io/pypi/dm/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides

A decorator to automatically detect mismatch when overriding a method.
See http://stackoverflow.com/questions/1167617/in-python-how-do-i-indicate-im-overriding-a-method

Installation
------------
.. code-block:: bash

$ pip install overrides
Usage
-----
.. code-block:: python

from overrides import overrides

class SuperClass(object):

def method(self):
"""This is the doc for method and will be shown in subclass method too!"""
return 2

class SubClass(SuperClass):

@overrides
def method(self):
return 1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

overrides-1.8.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

overrides-1.8-py2.7.egg (7.2 kB view hashes)

Uploaded Source

Supported by

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