Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit fed3f4a

Browse files
committed
Adjust typing
1 parent cf13187 commit fed3f4a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ repos:
1919
additional_dependencies:
2020
- pytest
2121
- freezegun
22+
exclude: '^examples/'

src/aws_sdk_signers/interfaces/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Request(Protocol):
122122
"""Protocol-agnostic representation of a request."""
123123

124124
destination: URI
125-
body: AsyncIterable[bytes] | Iterable[bytes]
125+
body: AsyncIterable[bytes] | Iterable[bytes] | None
126126

127127

128128
class URI(Protocol):

src/aws_sdk_signers/signers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,12 @@ async def _format_canonical_payload(
731731
checksum = sha256()
732732
if hasattr(body, "seek") and hasattr(body, "tell"):
733733
position = body.tell()
734-
async for chunk in body:
734+
async for chunk in body: # type: ignore[union-attr]
735735
checksum.update(chunk)
736736
await body.seek(position)
737737
else:
738738
buffer = io.BytesIO()
739-
async for chunk in body:
739+
async for chunk in body: # type: ignore[union-attr]
740740
buffer.write(chunk)
741741
checksum.update(chunk)
742742
buffer.seek(0)

0 commit comments

Comments
 (0)