Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): bump pyright to 1.1.359 #1337

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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