Commit 7a7e4bcc

Stainless Bot <107565488+stainless-bot@users.noreply.github.com>
2024-04-18 22:40:51
chore(internal): bump pyright to 1.1.359 (#1337)
1 parent 674c6ee
src/openai/_utils/_utils.py
@@ -265,6 +265,8 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]:
                     )
                     msg = f"Missing required arguments; Expected either {variations} arguments to be given"
                 else:
+                    assert len(variants) > 0
+
                     # TODO: this error message is not deterministic
                     missing = list(set(variants[0]) - given_params)
                     if len(missing) > 1:
src/openai/_models.py
@@ -378,7 +378,7 @@ def construct_type(*, value: object, type_: object) -> object:
 
     # unwrap `Annotated[T, ...]` -> `T`
     if is_annotated_type(type_):
-        meta = get_args(type_)[1:]
+        meta: tuple[Any, ...] = get_args(type_)[1:]
         type_ = extract_type_arg(type_, 0)
     else:
         meta = tuple()
pyproject.toml
@@ -50,7 +50,7 @@ openai = "openai.cli:main"
 managed = true
 # version pins are in requirements-dev.lock
 dev-dependencies = [
-    "pyright",
+    "pyright>=1.1.359",
     "mypy",
     "respx",
     "pytest",
requirements-dev.lock
@@ -24,7 +24,7 @@ attrs==23.1.0
 azure-core==1.30.1
     # via azure-identity
 azure-identity==1.15.0
-black==24.3.0
+black==24.4.0
     # via inline-snapshot
 certifi==2023.7.22
     # via httpcore
@@ -109,7 +109,7 @@ portalocker==2.8.2
     # via msal-extensions
 py==1.11.0
     # via pytest
-pycparser==2.21
+pycparser==2.22
     # via cffi
 pydantic==2.4.2
     # via openai
@@ -117,7 +117,7 @@ pydantic-core==2.10.1
     # via pydantic
 pyjwt==2.8.0
     # via msal
-pyright==1.1.353
+pyright==1.1.359
 pytest==7.1.1
     # via pytest-asyncio
 pytest-asyncio==0.21.1
@@ -156,7 +156,7 @@ tqdm==4.66.1
     # via openai
 trio==0.22.2
 types-pyaudio==0.2.16.20240106
-types-pytz==2024.1.0.20240203
+types-pytz==2024.1.0.20240417
     # via pandas-stubs
 types-toml==0.10.8.20240310
     # via inline-snapshot