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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4