name=getattr(module, '_yt_dlp__identifier', module.__name__),
version=str(next(filter(None, (
getattr(module, attr, None)
- for attr in ('__version__', 'version_string', 'version')
+ for attr in ('_yt_dlp__version', '__version__', 'version_string', 'version')
)), None)))
"""Passthrough parent module into a child module, creating the parent if necessary"""
def __getattr__(attr):
if _is_package(parent):
- with contextlib.suppress(ImportError):
+ with contextlib.suppress(ModuleNotFoundError):
return importlib.import_module(f'.{attr}', parent.__name__)
ret = from_child(attr)