Skip to content

Commit bc8bdee

Browse files
authored
Merge pull request #485 from lincc-frameworks/sean/fix-benchmarks-typing
Add type hints to benchmarks
2 parents 0d6a114 + 557f40d commit bc8bdee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python-project-template/src/{{package_name}}/{% if include_benchmarks %}example_benchmarks.py{% endif %}

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import random
44
import time
55

66

7-
def runtime_computation():
7+
def runtime_computation() -> None:
88
"""Runtime computation consuming between 0 and 5 seconds."""
99
time.sleep(random.uniform(0, 5))
1010

1111

12-
def memory_computation():
12+
def memory_computation() -> list[int]:
1313
"""Memory computation for a random list up to 512 samples."""
1414
return [0] * random.randint(0, 512)

0 commit comments

Comments
 (0)