From 9202e04d07a7c47232f39196346c734869b8f55a Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:12:48 +0100 Subject: [PATCH] chore(internal): bump pyright (#1193) --- requirements-dev.lock | 6 +++--- src/openai/_models.py | 2 +- src/openai/_utils/_proxy.py | 2 +- src/openai/cli/_tools/migrate.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index a08b9b692c..97f664e7c1 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -30,7 +30,7 @@ charset-normalizer==3.3.2 # via requests colorlog==6.7.0 # via nox -cryptography==42.0.3 +cryptography==42.0.5 # via azure-identity # via msal # via pyjwt @@ -57,7 +57,7 @@ idna==3.4 importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest -msal==1.26.0 +msal==1.27.0 # via azure-identity # via msal-extensions msal-extensions==1.1.0 @@ -96,7 +96,7 @@ pydantic-core==2.10.1 # via pydantic pyjwt==2.8.0 # via msal -pyright==1.1.332 +pyright==1.1.351 pytest==7.1.1 # via pytest-asyncio pytest-asyncio==0.21.1 diff --git a/src/openai/_models.py b/src/openai/_models.py index 48d5624f64..810891497a 100644 --- a/src/openai/_models.py +++ b/src/openai/_models.py @@ -283,7 +283,7 @@ def construct_type(*, value: object, type_: type) -> object: if is_union(origin): try: - return validate_type(type_=type_, value=value) + return validate_type(type_=cast("type[object]", type_), value=value) except Exception: pass diff --git a/src/openai/_utils/_proxy.py b/src/openai/_utils/_proxy.py index 6f05efcd21..b9c12dc3f4 100644 --- a/src/openai/_utils/_proxy.py +++ b/src/openai/_utils/_proxy.py @@ -45,7 +45,7 @@ def __dir__(self) -> Iterable[str]: @property # type: ignore @override - def __class__(self) -> type: + def __class__(self) -> type: # pyright: ignore proxied = self.__get_proxied__() if issubclass(type(proxied), LazyProxy): return type(proxied) diff --git a/src/openai/cli/_tools/migrate.py b/src/openai/cli/_tools/migrate.py index 14773302e1..53073b866f 100644 --- a/src/openai/cli/_tools/migrate.py +++ b/src/openai/cli/_tools/migrate.py @@ -138,7 +138,7 @@ def install() -> Path: unpacked_dir.mkdir(parents=True, exist_ok=True) with tarfile.open(temp_file, "r:gz") as archive: - archive.extractall(unpacked_dir) + archive.extractall(unpacked_dir, filter="data") for item in unpacked_dir.iterdir(): item.rename(target_dir / item.name)