From de15f3d02d4d58e06362c72f371c87c81ae9cf9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek?= Date: Tue, 26 Jul 2022 22:13:37 +0200 Subject: [PATCH] Fix typehints? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Valíček --- repo_cloner/lib/repo_tool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/repo_cloner/lib/repo_tool.py b/repo_cloner/lib/repo_tool.py index 835776d..0368dd8 100644 --- a/repo_cloner/lib/repo_tool.py +++ b/repo_cloner/lib/repo_tool.py @@ -3,6 +3,7 @@ from git.exc import NoSuchPathError, InvalidGitRepositoryError from git import RemoteProgress import logging import time +from typing import Union, Optional log = logging.getLogger("rc.repo") @@ -51,9 +52,9 @@ class GitRemoteProgress(RemoteProgress): def update( self, op_code: int, - cur_count: str | float, - max_count: str | float | None = None, - message: str | None = "", + cur_count: Union[float, str], + max_count: Optional[float, str] = None, + message: Optional[str] = "", ) -> None: # Do i need to update? # -> begin : YES