Skip to content

Commit 65be417

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

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

maths/number_of_digits.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def num_digits(n: int) -> int:
2121
...
2222
TypeError: Input must be an integer
2323
"""
24-
24+
2525
if not isinstance(n, int):
2626
raise TypeError("Input must be an integer")
2727

@@ -55,10 +55,10 @@ def num_digits_fast(n: int) -> int:
5555
...
5656
TypeError: Input must be an integer
5757
"""
58-
58+
5959
if not isinstance(n, int):
6060
raise TypeError("Input must be an integer")
61-
61+
6262
return 1 if n == 0 else math.floor(math.log(abs(n), 10) + 1)
6363

6464

@@ -82,10 +82,10 @@ def num_digits_faster(n: int) -> int:
8282
...
8383
TypeError: Input must be an integer
8484
"""
85-
85+
8686
if not isinstance(n, int):
8787
raise TypeError("Input must be an integer")
88-
88+
8989
return len(str(abs(n)))
9090

9191

0 commit comments

Comments
 (0)