We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70f6e43 commit 8b21176Copy full SHA for 8b21176
bson/binary.py
@@ -462,7 +462,7 @@ def from_vector(
462
raise ValueError(f"{padding=}. It must be in [0,1, ..7].")
463
if padding and not vector:
464
raise ValueError("Empty vector with non-zero padding.")
465
- if padding and not (vector[-1] & ((1 << padding) - 1)) == 0:
+ if padding and not (vector[-1] & ((1 << padding) - 1)) == 0: # type: ignore
466
raise ValueError(
467
"If padding p is provided, all bits in the final byte lower than p must be 0."
468
)
0 commit comments