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
========
.. 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
Release history Release notifications | RSS feed
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.6.tar.gz
(2.9 kB
view details)
File details
Details for the file overrides-1.6.tar.gz.
File metadata
- Download URL: overrides-1.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd2aceedc6b26b4205e5ebd3a6d1f9b04facd84eefbf93b4299cb3bf003b0ec
|
|
| MD5 |
cd2c5bc7b3e62e00b4fd3cc03ddc6356
|
|
| BLAKE2b-256 |
ba3598d8164a22cc950638aa3221c94de8445637beecd285bdcca792831f07a6
|