From fcefbdc05168de4b80e934b69c55240f1f91d6e9 Mon Sep 17 00:00:00 2001 From: Vuk Manojlovic Date: Fri, 14 Jul 2023 15:30:29 +0200 Subject: [PATCH] CTX-4070: Updated typing and documentation --- coretex/networking/network_manager_base.py | 6 +++--- coretex/networking/requests_manager.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coretex/networking/network_manager_base.py b/coretex/networking/network_manager_base.py index 4601a06c..46047a64 100644 --- a/coretex/networking/network_manager_base.py +++ b/coretex/networking/network_manager_base.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from typing import Optional, Any, Dict, List +from typing import Optional, Any, Dict, List, Union from pathlib import Path from abc import ABC, abstractmethod from importlib.metadata import version as getLibraryVersion @@ -249,7 +249,7 @@ def genericDownload( def sampleDownload( self, endpoint: str, - destination: str, + destination: Union[str, Path], ignoreCache: bool, parameters: Optional[Dict[str, Any]] = None, retryCount: int = 0 @@ -261,7 +261,7 @@ def sampleDownload( ---------- endpoint : str API endpoint - destination : str + destination : Union[str, Path] path to save file ignoreCache : bool whether to overwrite local cache diff --git a/coretex/networking/requests_manager.py b/coretex/networking/requests_manager.py index e194f031..898ce89e 100644 --- a/coretex/networking/requests_manager.py +++ b/coretex/networking/requests_manager.py @@ -221,7 +221,7 @@ def streamingDownload( ---------- endpoint : str API endpoint - destination : str + destination : Union[str, Path] path to save file ignoreCache : bool whether to overwrite local cache