We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4de8f3c commit 9599158Copy full SHA for 9599158
codeflash/code_utils/time_utils.py
@@ -54,7 +54,7 @@ def humanize_runtime(time_in_ns: int) -> str:
54
def format_time(nanoseconds: int) -> str:
55
"""Format nanoseconds into a human-readable string with 3 significant digits when needed."""
56
# Define conversion factors and units
57
- if type(nanoseconds):
+ if not isinstance(nanoseconds, int):
58
raise TypeError("Input must be an integer.")
59
if nanoseconds < 0:
60
raise ValueError("Input must be a positive integer.")
0 commit comments