From 21633673c33f082c6673bc245e4a90d880729a58 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 18 May 2022 09:04:30 +0530 Subject: [cleanup] Minor fixes --- devscripts/make_lazy_extractors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devscripts/make_lazy_extractors.py') diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index 8c481bc2d..cd1985c8e 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import os import optparse +import os import sys from inspect import getsource -- cgit v1.2.3 From 560738f34de4df6eaf82290fd503def3f366f878 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 15 Jun 2022 18:00:34 +0530 Subject: [extractor] Import `_ALL_CLASSES` lazily This significantly speeds up `import yt_dlp` in the absence of `lazy_extractors` --- devscripts/make_lazy_extractors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devscripts/make_lazy_extractors.py') diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index cd1985c8e..39d4646d0 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -53,7 +53,7 @@ def get_all_ies(): if os.path.exists(PLUGINS_DIRNAME): os.rename(PLUGINS_DIRNAME, BLOCKED_DIRNAME) try: - from yt_dlp.extractor import _ALL_CLASSES + from yt_dlp.extractor.extractors import _ALL_CLASSES finally: if os.path.exists(BLOCKED_DIRNAME): os.rename(BLOCKED_DIRNAME, PLUGINS_DIRNAME) -- cgit v1.2.3 From 54007a45f11ed730352324289b714baefd2901eb Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 24 Jun 2022 16:36:16 +0530 Subject: [cleanup] Consistent style for file heads --- devscripts/make_lazy_extractors.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'devscripts/make_lazy_extractors.py') diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index 39d4646d0..785d66a6a 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -1,12 +1,15 @@ #!/usr/bin/env python3 -import optparse + +# Allow direct execution import os import sys -from inspect import getsource sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +import optparse +from inspect import getsource + NO_ATTR = object() STATIC_CLASS_PROPERTIES = ['IE_NAME', 'IE_DESC', 'SEARCH_KEY', '_WORKING', '_NETRC_MACHINE', 'age_limit'] CLASS_METHODS = [ -- cgit v1.2.3