Skip to content

Commit a489290

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): bump pyright to 1.1.359 (#355)
1 parent d909f7d commit a489290

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Repository = "https://github.com/Finch-API/finch-api-python"
4848
managed = true
4949
# version pins are in requirements-dev.lock
5050
dev-dependencies = [
51-
"pyright",
51+
"pyright>=1.1.359",
5252
"mypy",
5353
"respx",
5454
"pytest",

requirements-dev.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pydantic==2.4.2
6363
# via finch-api
6464
pydantic-core==2.10.1
6565
# via pydantic
66-
pyright==1.1.353
66+
pyright==1.1.359
6767
pytest==7.1.1
6868
# via pytest-asyncio
6969
pytest-asyncio==0.21.1

src/finch/_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()

src/finch/_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)