File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
project_euler/problem_009 Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ repos:
16
16
- id : auto-walrus
17
17
18
18
- repo : https://github.com/astral-sh/ruff-pre-commit
19
- rev : v0.9.3
19
+ rev : v0.9.4
20
20
hooks :
21
21
- id : ruff
22
22
- id : ruff-format
23
23
24
24
- repo : https://github.com/codespell-project/codespell
25
- rev : v2.4.0
25
+ rev : v2.4.1
26
26
hooks :
27
27
- id : codespell
28
28
additional_dependencies :
Original file line number Diff line number Diff line change 15
15
References:
16
16
- https://en.wikipedia.org/wiki/Pythagorean_triple
17
17
"""
18
-
18
+ import timeit
19
19
20
20
def solution () -> int :
21
21
"""
@@ -63,7 +63,7 @@ def benchmark() -> None:
63
63
"""
64
64
Benchmark code comparing two different version function.
65
65
"""
66
- import timeit
66
+
67
67
68
68
print (
69
69
timeit .timeit ("solution()" , setup = "from __main__ import solution" , number = 1000 )
@@ -76,4 +76,7 @@ def benchmark() -> None:
76
76
77
77
78
78
if __name__ == "__main__" :
79
+ import doctest
80
+
81
+ doctest .testmod ()
79
82
print (f"{ solution () = } " )
You can’t perform that action at this time.
0 commit comments