From a9476cb6231f38e257957bd075f2bc878420989c Mon Sep 17 00:00:00 2001 From: "Padraig X. Lamont" Date: Sun, 22 Jan 2023 04:02:00 +0800 Subject: [PATCH] Fix typing of credentials parameter of make_client in the Python SDK (#5609) ### Motivation and context This is a very simple pull request. The type of the credentials parameter of `make_client` is currently `Optional[Tuple[int, int]]`, but it should be `Optional[Tuple[str, str]]` as used by `Client#login`. This PR makes that change. ### How has this been tested? The typing does not affect the functionality of the code (just the warnings I get in an IDE). --- CHANGELOG.md | 1 + cvat-sdk/cvat_sdk/core/client.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 568f37d5..f30820bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed HRNet serverless function runtime error on images with alpha channel () - Preview & chunk cache settings are ignored () - Export annotations to Azure container () +- Fix the type of the credentials parameter of make_client from the Python SDK ### Security - Fixed vulnerability with social authentication () diff --git a/cvat-sdk/cvat_sdk/core/client.py b/cvat-sdk/cvat_sdk/core/client.py index 04169ced..b6e4a024 100644 --- a/cvat-sdk/cvat_sdk/core/client.py +++ b/cvat-sdk/cvat_sdk/core/client.py @@ -319,7 +319,7 @@ class CVAT_API_V2: def make_client( - host: str, *, port: Optional[int] = None, credentials: Optional[Tuple[int, int]] = None + host: str, *, port: Optional[int] = None, credentials: Optional[Tuple[str, str]] = None ) -> Client: url = host.rstrip("/") if port: