Skip to content

Commit 335fd2a

Browse files
committed
Re-run ruff format
1 parent c5860cc commit 335fd2a

File tree

3 files changed

+25
-21
lines changed
  • packages
    • aws-event-stream/src/aws_event_stream
    • smithy-core/src/smithy_core/interfaces
    • smithy-http/src/smithy_http/aio/interfaces

3 files changed

+25
-21
lines changed

packages/aws-event-stream/src/aws_event_stream/events.py

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,13 @@ class _DecodeUtils:
611611
INT64_BYTE_FORMAT = "!q"
612612

613613
# uint byte size to unpack format
614-
UINT_BYTE_FORMAT: Mapping[_ArraySize, str] = MappingProxyType({
615-
1: UINT8_BYTE_FORMAT,
616-
2: UINT16_BYTE_FORMAT,
617-
4: UINT32_BYTE_FORMAT,
618-
})
614+
UINT_BYTE_FORMAT: Mapping[_ArraySize, str] = MappingProxyType(
615+
{
616+
1: UINT8_BYTE_FORMAT,
617+
2: UINT16_BYTE_FORMAT,
618+
4: UINT32_BYTE_FORMAT,
619+
}
620+
)
619621

620622
@staticmethod
621623
def unpack_uint8(data: BytesLike) -> tuple[int, int]:
@@ -750,20 +752,24 @@ class EventHeaderDecoder(Iterator[tuple[str, HEADER_VALUE]]):
750752

751753
# Maps header type to appropriate unpacking function
752754
# These unpacking functions return the value and the amount unpacked
753-
_HEADER_TYPE_MAP: Mapping[int, Callable[[BytesLike], tuple[HEADER_VALUE, int]]] = MappingProxyType({
754-
# Boolean headers have no data bytes following the type signifier, so they
755-
# can just return static values.
756-
0: lambda b: (True, 0), # boolean_true
757-
1: lambda b: (False, 0), # boolean_false
758-
2: _DecodeUtils.unpack_int8, # byte
759-
3: _DecodeUtils.unpack_int16, # short
760-
4: _DecodeUtils.unpack_int32, # integer
761-
5: _DecodeUtils.unpack_int64, # long
762-
6: _DecodeUtils.unpack_byte_array, # byte_array
763-
7: _DecodeUtils.unpack_utf8_string, # string
764-
8: _DecodeUtils.unpack_timestamp, # timestamp
765-
9: _DecodeUtils.unpack_uuid, # uuid
766-
})
755+
_HEADER_TYPE_MAP: Mapping[int, Callable[[BytesLike], tuple[HEADER_VALUE, int]]] = (
756+
MappingProxyType(
757+
{
758+
# Boolean headers have no data bytes following the type signifier, so they
759+
# can just return static values.
760+
0: lambda b: (True, 0), # boolean_true
761+
1: lambda b: (False, 0), # boolean_false
762+
2: _DecodeUtils.unpack_int8, # byte
763+
3: _DecodeUtils.unpack_int16, # short
764+
4: _DecodeUtils.unpack_int32, # integer
765+
5: _DecodeUtils.unpack_int64, # long
766+
6: _DecodeUtils.unpack_byte_array, # byte_array
767+
7: _DecodeUtils.unpack_utf8_string, # string
768+
8: _DecodeUtils.unpack_timestamp, # timestamp
769+
9: _DecodeUtils.unpack_uuid, # uuid
770+
}
771+
)
772+
)
767773

768774
def __init__(self, header_bytes: BytesLike) -> None:
769775
"""Initialize an event header decoder.

packages/smithy-core/src/smithy_core/interfaces/identity.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class IdentityProperties(TypedDict):
2626
"""Properties used to help determine the identity to return."""
2727

2828

29-
3029
IdentityPropertiesType = TypeVar("IdentityPropertiesType", bound=IdentityProperties)
3130
IdentityPropertiesType_contra = TypeVar(
3231
"IdentityPropertiesType_contra", bound=IdentityProperties, contravariant=True

packages/smithy-http/src/smithy_http/aio/interfaces/auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class SigningProperties(TypedDict):
2424
"""Additional properties loaded to modify the signing process."""
2525

2626

27-
2827
SigningPropertiesType = TypeVar("SigningPropertiesType", bound=SigningProperties)
2928
SigningPropertiesType_contra = TypeVar(
3029
"SigningPropertiesType_contra", bound=SigningProperties, contravariant=True

0 commit comments

Comments
 (0)