[yt-dlp] Make _Params["paths"] a Mapping[str, str]
paths accepts a dict of output paths (keys: 'home', 'temp', and OUTTMPL_TYPES keys). Typing it as Mapping[str, str] | None matches runtime behavior and avoids false positives when passing a dict to YoutubeDL params.
paths key description in YoutubeDL.py:
Dictionary of output paths. The allowed keys are 'home', 'temp' and the keys of OUTTMPL_TYPES (in utils/_utils.py)
It's also asserted to be a dict in get_output_path:
assert isinstance(paths, dict), '"paths" parameter must be a dictionary'
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
Considering that it must be a dict, typing it as dict[str, str] sounds safer. In this case, there are no variance issues like we often have with dicts in argument positions. We could even consider using a literal as key or using a TypedDict.