Skip to content

Commit

Permalink
chore(internal): bump pyright to 1.1.359 (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Apr 18, 2024
1 parent 8f9223b commit feec0dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -109,15 +109,15 @@ 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
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions src/openai/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ def wrapper(*args: object, **kwargs: object) -> object:
)
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:
Expand Down

0 comments on commit feec0dd

Please sign in to comment.