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.8.tar.gz
(3.3 kB
view details)
Built Distribution
overrides-1.8-py2.7.egg
(7.2 kB
view details)
File details
Details for the file overrides-1.8.tar.gz
.
File metadata
- Download URL: overrides-1.8.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf0a02552001aeafeaac154e61b0b2fd378ec56d30b086dec9512741f9dcc4b9 |
|
MD5 | 9cdc6483ccfaf6a92953cb0e32056df3 |
|
BLAKE2b-256 | 0fd0cb55e002609e2f3f6442518c610e60650a6fab07fdd681cc09ec3c6ca47f |
Provenance
File details
Details for the file overrides-1.8-py2.7.egg
.
File metadata
- Download URL: overrides-1.8-py2.7.egg
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ccd5b18e3aadb5801700e3adc50f18618b26f79040d17a6d2314bf6ec4fc9c |
|
MD5 | 669988f4f299d433da9ce5526fafdc62 |
|
BLAKE2b-256 | b9b9554899d8883258ef7b9f3c2ce00c5fa5a5bf4a61be646db6e5e239402bb3 |