diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-16 18:21:02 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-16 18:21:02 +0100 |
commit | 55a94110287ad2b1a55953febac48422a9d3ba89 (patch) | |
tree | ca57ff2df49383e3f34a31df8c7c7e3d06470ba1 /crates/yt_dlp | |
parent | refactor(yt/): Use the new `termsize` and `uu_fmt` crates (diff) | |
download | yt-55a94110287ad2b1a55953febac48422a9d3ba89.zip |
style(treewide): Re-format
Diffstat (limited to 'crates/yt_dlp')
-rw-r--r-- | crates/yt_dlp/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/yt_dlp/src/logging.rs | 5 | ||||
-rw-r--r-- | crates/yt_dlp/src/tests.rs | 2 | ||||
-rw-r--r-- | crates/yt_dlp/src/wrapper/info_json.rs | 2 | ||||
-rw-r--r-- | crates/yt_dlp/src/wrapper/yt_dlp_options.rs | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/crates/yt_dlp/src/lib.rs b/crates/yt_dlp/src/lib.rs index 129d4db..40610c2 100644 --- a/crates/yt_dlp/src/lib.rs +++ b/crates/yt_dlp/src/lib.rs @@ -22,12 +22,12 @@ use crate::{duration::Duration, logging::setup_logging, wrapper::info_json::Info use bytes::Bytes; use error::YtDlpError; -use log::{debug, info, log_enabled, Level}; +use log::{Level, debug, info, log_enabled}; use pyo3::types::{PyString, PyTuple, PyTupleMethods}; use pyo3::{ - pyfunction, + Bound, PyAny, PyResult, Python, pyfunction, types::{PyAnyMethods, PyDict, PyDictMethods, PyList, PyListMethods, PyModule}, - wrap_pyfunction, Bound, PyAny, PyResult, Python, + wrap_pyfunction, }; use serde::Serialize; use serde_json::{Map, Value}; diff --git a/crates/yt_dlp/src/logging.rs b/crates/yt_dlp/src/logging.rs index 670fc1c..e731502 100644 --- a/crates/yt_dlp/src/logging.rs +++ b/crates/yt_dlp/src/logging.rs @@ -17,10 +17,11 @@ use std::ffi::CString; -use log::{logger, Level, MetadataBuilder, Record}; +use log::{Level, MetadataBuilder, Record, logger}; use pyo3::{ + Bound, PyAny, PyResult, Python, prelude::{PyAnyMethods, PyListMethods, PyModuleMethods}, - pyfunction, wrap_pyfunction, Bound, PyAny, PyResult, Python, + pyfunction, wrap_pyfunction, }; /// Consume a Python `logging.LogRecord` and emit a Rust `Log` instead. diff --git a/crates/yt_dlp/src/tests.rs b/crates/yt_dlp/src/tests.rs index b072348..91b6626 100644 --- a/crates/yt_dlp/src/tests.rs +++ b/crates/yt_dlp/src/tests.rs @@ -10,7 +10,7 @@ use std::sync::LazyLock; -use serde_json::{json, Value}; +use serde_json::{Value, json}; use url::Url; static YT_OPTS: LazyLock<serde_json::Map<String, Value>> = LazyLock::new(|| { diff --git a/crates/yt_dlp/src/wrapper/info_json.rs b/crates/yt_dlp/src/wrapper/info_json.rs index 720740c..4b80245 100644 --- a/crates/yt_dlp/src/wrapper/info_json.rs +++ b/crates/yt_dlp/src/wrapper/info_json.rs @@ -13,7 +13,7 @@ use std::{collections::HashMap, path::PathBuf}; -use pyo3::{types::PyDict, Bound, PyResult, Python}; +use pyo3::{Bound, PyResult, Python, types::PyDict}; use serde::{Deserialize, Deserializer, Serialize}; use serde_json::Value; use url::Url; diff --git a/crates/yt_dlp/src/wrapper/yt_dlp_options.rs b/crates/yt_dlp/src/wrapper/yt_dlp_options.rs index c2a86df..25595b5 100644 --- a/crates/yt_dlp/src/wrapper/yt_dlp_options.rs +++ b/crates/yt_dlp/src/wrapper/yt_dlp_options.rs @@ -8,7 +8,7 @@ // You should have received a copy of the License along with this program. // If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -use pyo3::{types::PyDict, Bound, PyResult, Python}; +use pyo3::{Bound, PyResult, Python, types::PyDict}; use serde::Serialize; use crate::json_loads; |