Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
cast legacy verify to bool (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 authored Sep 19, 2024
1 parent eb10f24 commit c363461
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions cads_api_client/legacy_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
key: str | None = None,
quiet: bool = False,
debug: bool = False,
verify: bool | None = None,
verify: bool | int | None = None,
timeout: int = 60,
progress: bool = True,
*args: Any,
Expand All @@ -80,9 +80,8 @@ def __init__(
if wrong_kwargs := set(kwargs) - set(LEGACY_KWARGS):
raise ValueError(f"Wrong parameters: {wrong_kwargs}.")

self.url, self.key, self.verify = cdsapi.api.get_url_key_verify(
url, key, verify
)
self.url, self.key, verify = cdsapi.api.get_url_key_verify(url, key, verify)
self.verify = bool(verify)
self.quiet = quiet
self._debug = debug
self.timeout = timeout
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test_50_legacy_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_legacy_api_client_kwargs(api_root_url: str, api_anon_key: str) -> None:
client = legacy_api_client.LegacyApiClient(
url=api_root_url,
key=api_anon_key,
verify=False,
verify=0,
timeout=1,
progress=False,
delete=True,
Expand Down

0 comments on commit c363461

Please sign in to comment.