PEP8 cleanup of transaction.py