How to Solve NameError: name 'Generic' is not defined -- typing

Solution: Import the 'Generic' module

To Solve the error, add the following line to the top of your code.

from typing import Generic

 

For more information:
Python typing Generic