From 36ec2b8b1b556d0058d72495f0720c1242400ea3 Mon Sep 17 00:00:00 2001 From: OB Date: Sat, 12 Oct 2024 21:33:47 -0700 Subject: [PATCH] Fix types for parameters that are passed to requests library. Add str type hint for url, token --- pycti/api/opencti_api_client.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pycti/api/opencti_api_client.py b/pycti/api/opencti_api_client.py index ffdc0eb9..6f6d2cbc 100644 --- a/pycti/api/opencti_api_client.py +++ b/pycti/api/opencti_api_client.py @@ -83,13 +83,13 @@ class OpenCTIApiClient: :param log_level: log level for the client :type log_level: str, optional :param ssl_verify: Requiring the requests to verify the TLS certificate at the server. - :type ssl_verify: bool, optional + :type ssl_verify: bool, str, optional :param proxies: :type proxies: dict, optional, The proxy configuration, would have `http` and `https` attributes. Defaults to {} ``` proxies: { - "http: "http://my_proxy:8080" - "https: "http://my_proxy:8080" + "http": "http://my_proxy:8080" + "https": "http://my_proxy:8080" } ``` :param json_logging: format the logs as json if set to True @@ -102,14 +102,14 @@ class OpenCTIApiClient: def __init__( self, - url, - token, + url: str, + token: str, log_level="info", - ssl_verify=False, - proxies=None, + ssl_verify: bool | str = False, + proxies: dict[str,str] | None = None, json_logging=False, bundle_send_to_queue=True, - cert=None, + cert: str | tuple[str, str] |None = None, auth=None, perform_health_check=True, ):