From 32e288df8143ef14f9ce8030bd2719bef0123816 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 4 Jul 2023 09:47:18 +0200 Subject: [PATCH] Make type hint compatible with Python 3.9 --- geotribu_cli/images/optim_tinify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geotribu_cli/images/optim_tinify.py b/geotribu_cli/images/optim_tinify.py index b5db4cc..15ed695 100644 --- a/geotribu_cli/images/optim_tinify.py +++ b/geotribu_cli/images/optim_tinify.py @@ -9,6 +9,7 @@ import sys from os import getenv from pathlib import Path +from typing import Union from urllib.parse import unquote, urlsplit # 3rd party @@ -53,7 +54,7 @@ def tinify_check_api_limit() -> int: def optimize_with_tinify( - image_path_or_url: str | Path, image_type: str = "body" + image_path_or_url: Union[str, Path], image_type: str = "body" ) -> Path: """Optimize image using Tinify API (tinypng.com).