mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
refactor: use walrus
This commit is contained in:
parent
b4ba18f913
commit
80f8fa771c
1 changed files with 1 additions and 2 deletions
|
@ -168,8 +168,7 @@ def invalidate_caches(self):
|
||||||
|
|
||||||
def directories():
|
def directories():
|
||||||
with contextlib.suppress(ModuleNotFoundError):
|
with contextlib.suppress(ModuleNotFoundError):
|
||||||
spec = importlib.util.find_spec(PACKAGE_NAME)
|
if spec := importlib.util.find_spec(PACKAGE_NAME):
|
||||||
if spec:
|
|
||||||
return list(spec.submodule_search_locations)
|
return list(spec.submodule_search_locations)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue