If you are on 3.7 you can add this import:
from __future__ import annotations
And then forward references don't need to be strings. I wonder if this could fix the generated page.