Skip to content

Commit ae7ef79

Browse files
Fix Python 3.8 compatibility: replace removesuffix with slice
str.removesuffix() requires Python 3.9+. Replace with a string slice to maintain compatibility with older Python versions used in CI. Signed-off-by: Harsh Kumar Patwa <harshkumarpatwa@gmail.com> Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
1 parent ade94d0 commit ae7ef79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flow/util/genMetrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def extract_metrics(
342342
)
343343
total += delta
344344

345-
stage = key.removesuffix("__runtime__total")
345+
stage = key[: -len("__runtime__total")]
346346
elapsed_seconds[stage + "__elapsed_seconds"] = delta.total_seconds()
347347

348348
if failed:

0 commit comments

Comments
 (0)