Skip to content

Commit feec0dd

Browse files
chore(internal): bump pyright to 1.1.359 (#1337)
1 parent 8f9223b commit feec0dd

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ openai = "openai.cli:main"
5050
managed = true
5151
# version pins are in requirements-dev.lock
5252
dev-dependencies = [
53-
"pyright",
53+
"pyright>=1.1.359",
5454
"mypy",
5555
"respx",
5656
"pytest",

Diff for: requirements-dev.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ attrs==23.1.0
2424
azure-core==1.30.1
2525
# via azure-identity
2626
azure-identity==1.15.0
27-
black==24.3.0
27+
black==24.4.0
2828
# via inline-snapshot
2929
certifi==2023.7.22
3030
# via httpcore
@@ -109,15 +109,15 @@ portalocker==2.8.2
109109
# via msal-extensions
110110
py==1.11.0
111111
# via pytest
112-
pycparser==2.21
112+
pycparser==2.22
113113
# via cffi
114114
pydantic==2.4.2
115115
# via openai
116116
pydantic-core==2.10.1
117117
# via pydantic
118118
pyjwt==2.8.0
119119
# via msal
120-
pyright==1.1.353
120+
pyright==1.1.359
121121
pytest==7.1.1
122122
# via pytest-asyncio
123123
pytest-asyncio==0.21.1
@@ -156,7 +156,7 @@ tqdm==4.66.1
156156
# via openai
157157
trio==0.22.2
158158
types-pyaudio==0.2.16.20240106
159-
types-pytz==2024.1.0.20240203
159+
types-pytz==2024.1.0.20240417
160160
# via pandas-stubs
161161
types-toml==0.10.8.20240310
162162
# via inline-snapshot

Diff for: src/openai/_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def construct_type(*, value: object, type_: object) -> object:
378378

379379
# unwrap `Annotated[T, ...]` -> `T`
380380
if is_annotated_type(type_):
381-
meta = get_args(type_)[1:]
381+
meta: tuple[Any, ...] = get_args(type_)[1:]
382382
type_ = extract_type_arg(type_, 0)
383383
else:
384384
meta = tuple()

Diff for: src/openai/_utils/_utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ def wrapper(*args: object, **kwargs: object) -> object:
265265
)
266266
msg = f"Missing required arguments; Expected either {variations} arguments to be given"
267267
else:
268+
assert len(variants) > 0
269+
268270
# TODO: this error message is not deterministic
269271
missing = list(set(variants[0]) - given_params)
270272
if len(missing) > 1:

0 commit comments

Comments
 (0)