tombstones

Python package to mark dead code.


Keywords
dead, code, unreachable
License
BSD-3-Clause
Install
pip install tombstones==0.1

Documentation

Tombstones

Build Status Coverage Status

Python package to mark code that you suspect is unreachable or dead.

Installation

To install the package:

$ pip install tombstones

Usage

If you believe a function, class or method is never used, mark it with a tombstone.

from tombstones import tombstone

@tombstone
def example_function():
    pass

@tombstone
class ExampleClass(object):
    pass

class AnotherExampleClass(object):
    @tombstone
    def example_method(self):
        pass

If your tombstone is ever executed, it will save to an entry log file, which you can read with the following command:

$ tombstones active

You can then remove any active tombstones, as they're not marking dead code.

Active tombstones
-----------------
example_function in test_decorator.py at line number 3
Last used at 2015-10-07 16:14:18