about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-17 08:59:14 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-17 08:59:14 +0200
commite0120c08672009f8d4445eebef8efb22ddae5fb3 (patch)
tree7685b75b3e0dcf0ee37809c986c32ba4b4f795c0
parentfix(yt_dlp): Typos in strings (diff)
downloadyt-e0120c08672009f8d4445eebef8efb22ddae5fb3.zip
refactor(yt_dlp/logging): Avoid adding to the `__all__` list
This seems to have no apparent effect on anything. As such I went ahead
and removed this dead code.
-rw-r--r--crates/yt_dlp/src/logging.rs28
1 files changed, 1 insertions, 27 deletions
diff --git a/crates/yt_dlp/src/logging.rs b/crates/yt_dlp/src/logging.rs
index 5cb4c1d..112836e 100644
--- a/crates/yt_dlp/src/logging.rs
+++ b/crates/yt_dlp/src/logging.rs
@@ -15,7 +15,7 @@
 use log::{Level, MetadataBuilder, Record, logger};
 use rustpython::vm::{
     PyObjectRef, PyRef, PyResult, VirtualMachine,
-    builtins::{PyInt, PyList, PyStr},
+    builtins::{PyInt, PyStr},
     convert::ToPyObject,
     function::FuncArgs,
 };
@@ -167,31 +167,5 @@ def basicConfig(*pargs, **kwargs):
         "<embedded logging inintializing code>".to_owned(),
     )?;
 
-    let all: PyRef<PyList> = logging
-        .get_attr("__all__", vm)?
-        .downcast()
-        .expect("Is a list");
-    all.borrow_vec_mut().push(vm.new_pyobj("HostHandler"));
-
-    // {
-    //     let logging_dict = logging.dict().expect("Exists");
-    //
-    //     for (key, val) in scope.globals {
-    //         let key: PyRef<PyStr> = key.downcast().expect("Is a string");
-    //
-    //         if !logging_dict.contains_key(key.as_str(), vm) {
-    //             logging_dict.set_item(key.as_str(), val, vm)?;
-    //         }
-    //     }
-    //
-    //     for (key, val) in scope.locals {
-    //         let key: PyRef<PyStr> = key.downcast().expect("Is a string");
-    //
-    //         if !logging_dict.contains_key(key.as_str(), vm) {
-    //             logging_dict.set_item(key.as_str(), val, vm)?;
-    //         }
-    //     }
-    // }
-
     Ok(scope.globals.to_pyobject(vm))
 }