diff options
Diffstat (limited to 'yt_dlp/utils/_utils.py')
-rw-r--r-- | yt_dlp/utils/_utils.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 3e7a375ee..4093c238c 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -52,6 +52,7 @@ from ..compat import ( compat_HTMLParseError, ) from ..dependencies import xattr +from ..globals import IN_CLI __name__ = __name__.rsplit('.', 1)[0] # noqa: A001: Pretend to be the parent module @@ -1487,8 +1488,7 @@ def write_string(s, out=None, encoding=None): # TODO: Use global logger def deprecation_warning(msg, *, printer=None, stacklevel=0, **kwargs): - from .. import _IN_CLI - if _IN_CLI: + if IN_CLI.value: if msg in deprecation_warning._cache: return deprecation_warning._cache.add(msg) @@ -4891,10 +4891,6 @@ class Config: filename = None __initialized = False - # Internal only, do not use! Hack to enable --plugin-dirs - # TODO(coletdjnz): remove when plugin globals system is implemented - _plugin_dirs = None - def __init__(self, parser, label=None): self.parser, self.label = parser, label self._loaded_paths, self.configs = set(), [] |