From e96ea2ef32d03f91e583089677be85afdf047842 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Mon, 26 Feb 2024 11:11:39 +0000 Subject: [PATCH] chore(internal): bump pyright --- requirements-dev.lock | 6 +++--- src/anthropic/_models.py | 2 +- src/anthropic/_utils/_proxy.py | 2 +- src/anthropic/lib/bedrock/_auth.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index f6b93ac3..b192ea55 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -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 @@ -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 @@ -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 diff --git a/src/anthropic/_models.py b/src/anthropic/_models.py index 48d5624f..81089149 100644 --- a/src/anthropic/_models.py +++ b/src/anthropic/_models.py @@ -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 diff --git a/src/anthropic/_utils/_proxy.py b/src/anthropic/_utils/_proxy.py index 6f05efcd..b9c12dc3 100644 --- a/src/anthropic/_utils/_proxy.py +++ b/src/anthropic/_utils/_proxy.py @@ -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) diff --git a/src/anthropic/lib/bedrock/_auth.py b/src/anthropic/lib/bedrock/_auth.py index 503094ea..df3b5f6b 100644 --- a/src/anthropic/lib/bedrock/_auth.py +++ b/src/anthropic/lib/bedrock/_auth.py @@ -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}