Skip to content

Commit 0e31f35

Browse files
pre-commit-ci[bot]lighting9999
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (#12554)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.4](astral-sh/ruff-pre-commit@v0.9.3...v0.9.4) - [github.com/codespell-project/codespell: v2.4.0 → v2.4.1](codespell-project/codespell@v2.4.0...v2.4.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 6c92c5a commit 0e31f35

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ repos:
1616
- id: auto-walrus
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.9.3
19+
rev: v0.9.4
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format
2323

2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.4.0
25+
rev: v2.4.1
2626
hooks:
2727
- id: codespell
2828
additional_dependencies:

project_euler/problem_009/sol1.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
References:
1616
- https://en.wikipedia.org/wiki/Pythagorean_triple
1717
"""
18-
18+
import timeit
1919

2020
def solution() -> int:
2121
"""
@@ -63,7 +63,7 @@ def benchmark() -> None:
6363
"""
6464
Benchmark code comparing two different version function.
6565
"""
66-
import timeit
66+
6767

6868
print(
6969
timeit.timeit("solution()", setup="from __main__ import solution", number=1000)
@@ -76,4 +76,7 @@ def benchmark() -> None:
7676

7777

7878
if __name__ == "__main__":
79+
import doctest
80+
81+
doctest.testmod()
7982
print(f"{solution() = }")

0 commit comments

Comments
 (0)