Skip to content

perclasson/python-tombstones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python package to mark dead code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published