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.python.org/pypi/overrides

.. image:: https://img.shields.io/pypi/dm/overrides.svg
:target: https://pypi.python.org/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.7.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file overrides-1.7.tar.gz.

File metadata

  • Download URL: overrides-1.7.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for overrides-1.7.tar.gz
Algorithm Hash digest
SHA256 0b1b5838fa700fd05353ff9213394147a3a271eda722beb086f7158b67f31a3f
MD5 f36d69609d7372ad9b00a9573f17f0d7
BLAKE2b-256 aa160f27f2afa56c7c15dc6c24a5c6be7b2281c006b0d0da7c91f6db7ba53dda

See more details on using hashes here.

Provenance

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