Skip to content

Commit 93f583c

Browse files
committed
typing fix for 3.9
1 parent d610f8c commit 93f583c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

codeflash/result/explanation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from __future__ import annotations
12
from pathlib import Path
3+
from typing import Optional, Union
24

35
from pydantic.dataclasses import dataclass
46

@@ -15,9 +17,9 @@ class Explanation:
1517
best_runtime_ns: int
1618
function_name: str
1719
file_path: Path
18-
replay_performance_gain: float | None
19-
fto_benchmark_timings: dict[str, int] | None
20-
total_benchmark_timings: dict[str, int] | None
20+
replay_performance_gain: Optional[float]
21+
fto_benchmark_timings: Optional[Union[dict, int]]
22+
total_benchmark_timings: Optional[Union[dict, int]]
2123

2224
@property
2325
def perf_improvement_line(self) -> str:

0 commit comments

Comments
 (0)