Skip to content

Commit

Permalink
chore(internal): bump pyright to 1.1.359 (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Apr 18, 2024
1 parent 8e3d8a6 commit 8088160
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 @@ Repository = "https://github.com/anthropics/anthropic-sdk-python"
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 @@ botocore==1.31.58
# via anthropic
# via boto3
# via s3transfer
botocore-stubs==1.34.69
botocore-stubs==1.34.86
# via boto3-stubs
cachetools==5.3.3
# via google-auth
Expand Down Expand Up @@ -94,7 +94,7 @@ pydantic==2.4.2
# via anthropic
pydantic-core==2.10.1
# via pydantic
pyright==1.1.353
pyright==1.1.359
pytest==7.1.1
# via pytest-asyncio
pytest-asyncio==0.21.1
Expand Down Expand Up @@ -129,9 +129,9 @@ tomli==2.0.1
# via pytest
tqdm==4.66.2
# via huggingface-hub
types-awscrt==0.20.5
types-awscrt==0.20.9
# via botocore-stubs
types-s3transfer==0.10.0
types-s3transfer==0.10.1
# via boto3-stubs
typing-extensions==4.8.0
# via anthropic
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/_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/anthropic/_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 8088160

Please sign in to comment.