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 #350

Merged
merged 1 commit into from
Feb 26, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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.45
botocore-stubs==1.34.49
# via boto3-stubs
cachetools==5.3.2
# 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.332
pyright==1.1.351
pytest==7.1.1
# via pytest-asyncio
pytest-asyncio==0.21.1
Expand Down Expand Up @@ -129,7 +129,7 @@ tomli==2.0.1
# via pytest
tqdm==4.66.2
# via huggingface-hub
types-awscrt==0.20.3
types-awscrt==0.20.4
# via botocore-stubs
types-s3transfer==0.10.0
# via boto3-stubs
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def construct_type(*, value: object, type_: type) -> object:

if is_union(origin):
try:
return validate_type(type_=type_, value=value)
return validate_type(type_=cast("type[object]", type_), value=value)
except Exception:
pass

Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/_utils/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __dir__(self) -> Iterable[str]:

@property # type: ignore
@override
def __class__(self) -> type:
def __class__(self) -> type: # pyright: ignore
proxied = self.__get_proxied__()
if issubclass(type(proxied), LazyProxy):
return type(proxied)
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/lib/bedrock/_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def get_auth_headers(

prepped = request.prepare()

return dict(prepped.headers)
return {key: value for key, value in dict(prepped.headers).items() if value is not None}