Update hooks.py.