Skip to content

Commit 9599158

Browse files
committed
hotfix
1 parent 4de8f3c commit 9599158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeflash/code_utils/time_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def humanize_runtime(time_in_ns: int) -> str:
5454
def format_time(nanoseconds: int) -> str:
5555
"""Format nanoseconds into a human-readable string with 3 significant digits when needed."""
5656
# Define conversion factors and units
57-
if type(nanoseconds):
57+
if not isinstance(nanoseconds, int):
5858
raise TypeError("Input must be an integer.")
5959
if nanoseconds < 0:
6060
raise ValueError("Input must be a positive integer.")

0 commit comments

Comments
 (0)