mirror of
https://github.com/openai/harmony.git
synced 2025-08-22 16:17:08 -04:00
clippy
This commit is contained in:
parent
6375a15ea1
commit
ff28a9ed87
2 changed files with 2 additions and 13 deletions
|
@ -12,9 +12,6 @@
|
|||
//! A thin, typed, user-facing Python wrapper around these low-level bindings is
|
||||
//! provided in `harmony/__init__.py`.
|
||||
|
||||
// Only compile when the `python-binding` feature is enabled.
|
||||
#![cfg(feature = "python-binding")]
|
||||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
// We need the `Python` type later on.
|
||||
|
@ -34,8 +31,6 @@ use crate::{
|
|||
load_harmony_encoding, HarmonyEncodingName,
|
||||
};
|
||||
|
||||
use serde_json;
|
||||
|
||||
/// A thin PyO3 wrapper around the Rust `HarmonyEncoding` struct.
|
||||
#[pyclass]
|
||||
struct PyHarmonyEncoding {
|
||||
|
@ -393,8 +388,7 @@ fn openai_harmony(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|||
"python" => ToolNamespaceConfig::python(),
|
||||
_ => {
|
||||
return Err(PyErr::new::<pyo3::exceptions::PyValueError, _>(format!(
|
||||
"Unknown tool namespace: {}",
|
||||
tool
|
||||
"Unknown tool namespace: {tool}"
|
||||
)));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![cfg(feature = "wasm-binding")]
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{
|
||||
|
@ -9,8 +7,6 @@ use crate::{
|
|||
};
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde_json;
|
||||
use serde_wasm_bindgen;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
|
@ -335,8 +331,7 @@ pub fn get_tool_namespace_config(tool: &str) -> Result<JsValue, JsValue> {
|
|||
"python" => ToolNamespaceConfig::python(),
|
||||
_ => {
|
||||
return Err(JsValue::from_str(&format!(
|
||||
"Unknown tool namespace: {}",
|
||||
tool
|
||||
"Unknown tool namespace: {tool}"
|
||||
)))
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue