Skip to content

Commit 093a6dc

Browse files
committed
Fix typing by adding BinaryVector.__len__
1 parent 8199493 commit 093a6dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bson/binary.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ def __eq__(self, other: Any) -> bool:
256256
self.dtype == other.dtype and self.padding == other.padding and self.data == other.data
257257
)
258258

259+
def __len__(self) -> int:
260+
return len(self.data)
261+
259262

260263
class Binary(bytes):
261264
"""Representation of BSON binary data.

0 commit comments

Comments
 (0)