Fix broken callback chaining example

if there was an error in any query, callbacks_full_pipeline.py would hang because "self.event" (or "finished_event" in the docs) would never get set. this also fixes some minor pep8 issues.