[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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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