1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-03 20:42:53 -05:00

[cleanup] Refactor __init__.py (#2570)

* Split `__init__` code into multiple functions
* Clean up validation code by grouping similar types of options
* Expose `parse_options` to third parties
This commit is contained in:
pukkandan
2022-03-09 01:33:31 +05:30
committed by GitHub
parent 1eae7f94c1
commit d1b5f70bc9
4 changed files with 486 additions and 467 deletions

View File

@ -3603,6 +3603,9 @@ def match_str(filter_str, dct, incomplete=False):
def match_filter_func(filter_str):
if filter_str is None:
return None
def _match_func(info_dict, *args, **kwargs):
if match_str(filter_str, info_dict, *args, **kwargs):
return None