]> khamidou — GitHub mirrors - safetensors.git/commitdiff
fix typo in serialize_file doc-string (#594)
authorLuca Vivona <lucavivona01@gmail.com>
Fri, 9 May 2025 06:57:51 +0000 (02:57 -0400)
committerGitHub <noreply@github.com>
Fri, 9 May 2025 06:57:51 +0000 (08:57 +0200)
* fix typo in serialize_file doc-string

* update __init__.pyi serialize_file

bindings/python/py_src/safetensors/__init__.pyi
bindings/python/src/lib.rs

index 7781229fe91d0649996e257dccf9f6d0c38823cd..fa74b755488afac91b084e631d4d9ea4ce872d1b 100644 (file)
@@ -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
 
index e16d7fdd41f10ec1b0935944e2096469d4973a01..be499d5d0dab0d9735df8407e3921693d121c852 100644 (file)
@@ -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(