From d0c6de6ec81e16a22467b75a7a7bff4cfde9929c Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Fri, 18 Oct 2024 16:51:32 -0500 Subject: [PATCH] Fixed Python < 3.9 typing imports --- rollbar/lib/transforms/shortener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rollbar/lib/transforms/shortener.py b/rollbar/lib/transforms/shortener.py index d996162e..fa8d7a76 100644 --- a/rollbar/lib/transforms/shortener.py +++ b/rollbar/lib/transforms/shortener.py @@ -4,7 +4,7 @@ import reprlib from collections.abc import Mapping -from typing import Union +from typing import Union, Tuple from rollbar.lib import ( integer_types, key_in, key_depth, sequence_types, @@ -26,7 +26,7 @@ } -def _max_left_right(max_len: int, seperator_len: int) -> tuple[int, int]: +def _max_left_right(max_len: int, seperator_len: int) -> Tuple[int, int]: left = max(0, (max_len-seperator_len)//2) right = max(0, max_len-seperator_len-left) return left, right