From: Luca Vivona Date: Fri, 9 May 2025 06:57:51 +0000 (-0400) Subject: fix typo in serialize_file doc-string (#594) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2c3cf41ccb52d16e9b2c3ee392a4b9353d167448;p=safetensors.git fix typo in serialize_file doc-string (#594) * fix typo in serialize_file doc-string * update __init__.pyi serialize_file --- diff --git a/bindings/python/py_src/safetensors/__init__.pyi b/bindings/python/py_src/safetensors/__init__.pyi index 7781229..fa74b75 100644 --- a/bindings/python/py_src/safetensors/__init__.pyi +++ b/bindings/python/py_src/safetensors/__init__.pyi @@ -36,7 +36,7 @@ def serialize(tensor_dict, metadata=None): @staticmethod def serialize_file(tensor_dict, filename, metadata=None): """ - Serializes raw data. + Serializes raw data into file. Args: tensor_dict (`Dict[str, Dict[Any]]`): @@ -48,8 +48,8 @@ def serialize_file(tensor_dict, filename, metadata=None): The optional purely text annotations Returns: - (`bytes`): - The serialized content. + (`NoneType`): + On success return None. """ pass diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index e16d7fd..be499d5 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -127,7 +127,7 @@ fn serialize<'b>( Ok(pybytes) } -/// Serializes raw data. +/// Serializes raw data into file. /// /// Args: /// tensor_dict (`Dict[str, Dict[Any]]`): @@ -139,8 +139,8 @@ fn serialize<'b>( /// The optional purely text annotations /// /// Returns: -/// (`bytes`): -/// The serialized content. +/// (`NoneType`): +/// On success return None #[pyfunction] #[pyo3(signature = (tensor_dict, filename, metadata=None))] fn serialize_file(