Skip to content

Commit a432438

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 953462c commit a432438

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

bit_manipulation/binary_count_trailing_zeros.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ def binary_count_trailing_zeros(a: int) -> int:
3434
TypeError: Input must be an integer
3535
"""
3636

37-
3837
if not isinstance(a, int):
3938
raise TypeError("Input must be an integer")
4039

41-
4240
if a < 0:
4341
raise ValueError("Input must be a non-negative integer")
4442

45-
4643
if a == 0:
4744
return 0
4845

49-
return int(log2(a & -a))
46+
return int(log2(a & -a))

0 commit comments

Comments
 (0)