Skip to content

Commit 142dddd

Browse files
committed
Fix pyright
1 parent 078aaf2 commit 142dddd

File tree

1 file changed

+5
-4
lines changed
  • packages/aws-sdk-signers/src/aws_sdk_signers

1 file changed

+5
-4
lines changed

packages/aws-sdk-signers/src/aws_sdk_signers/signers.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from ._http import AWSRequest, Field, URI
1818
from ._io import AsyncBytesReader
1919
from .exceptions import AWSSDKWarning, MissingExpectedParameterException
20+
from .interfaces.http import URI as InterfaceURI
2021
from .interfaces.identity import AWSCredentialsIdentity as _AWSCredentialsIdentity
2122
from .interfaces.io import AsyncSeekable, ConditionallySeekable, Seekable
2223

@@ -345,12 +346,12 @@ def _is_signable_header(self, field_name: str):
345346
return False
346347
return True
347348

348-
def _normalize_host_field(self, *, uri: URI) -> str:
349+
def _normalize_host_field(self, *, uri: InterfaceURI) -> str:
349350
if uri.port is not None and DEFAULT_PORTS.get(uri.scheme) == uri.port:
350351
uri_dict = uri.to_dict()
351352
uri_dict.update({"port": None})
352353
uri = URI(**uri_dict)
353-
host_header = uri.hostname
354+
host_header = uri.host
354355
if port := uri.port:
355356
host_header += f":{port}"
356357
return host_header
@@ -733,12 +734,12 @@ def _is_signable_header(self, field_name: str):
733734
return False
734735
return True
735736

736-
async def _normalize_host_field(self, *, uri: URI) -> str:
737+
async def _normalize_host_field(self, *, uri: InterfaceURI) -> str:
737738
if uri.port is not None and DEFAULT_PORTS.get(uri.scheme) == uri.port:
738739
uri_dict = uri.to_dict()
739740
uri_dict.update({"port": None})
740741
uri = URI(**uri_dict)
741-
host_header = uri.hostname
742+
host_header = uri.host
742743
if port := uri.port:
743744
host_header += f":{port}"
744745
return host_header

0 commit comments

Comments
 (0)