Closed
Description
I have some code doing:
def extract(path: Union[str, Path]) -> Generator:
with open(path) as f:
Mypy complains:
Argument 1 to "open" has incompatible type "Union[str, Path]"; expected "Union[str, bytes, int, _PathLike[Any]]"
But it seems to me that Union[str, Path] is an subset of Union[str, bytes, int, _PathLike[Any]], or am I mistaken ?
Metadata
Metadata
Assignees
Labels
No labels