I am using the mysql.connect library. I'd like to have a function that returns a connection and a cursor, but trying to annotate it always leads to errors like 'MySQLConnection is not defined'.
cnx: MySQLConnection = mysql.connector.connect(user='root', password='toor', host='127.0.0.1')
# "MySQLConnection" is not defined
How am I supposed to annotate this ?