Hackery, In the Best Way
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
hackery
vows
.gitignore
LICENSE
README
README.md
setup.py

README.md

Hackery is a python library that helps you track your hacks.

Before:

if 'questionable_field' not in incoming_data:
     # this doesn't get set for some reason by version 1.4 of our iOS app
     incoming_data['questionable_field'] = 0 # HACK.

After:

with VersionHack('ios-questionable-field', 'ios == 1.4', incoming_data_version) as hack:
    if hack:
        if 'questionable_field' not in incoming_data:
            hack.count('field-absent')
            incoming_data['questionable_field'] = 0

Keep your hacks and your sanity.