Fixed PEP 8 violations in Hooks