Below function works fine but I get an error from Mypy saying parameters type, Optional[dict], is not compatible with Union[dict, list, tuple].
def dummy(cursor: Cursor, parameters: dict | None) -> None:
for row in cursor.execute("select current_date from dual", parameters):
print(row[0])
Given parameters defaults to None, I believe type hint should include None too.