Closed YonatanGreenfeld closed 2 years ago
The aws ref you are linking to states OldImage
, userIdentity
& ApproximateCreationDateTime
as non required, see following screenshots
In fact even NewImage
is non required
That's correct. However, in TypedDict terms, Optional
is not the same as not required (as you probably know). The class is already not total
so I think we just need to remove the Optional
s
PEP-655
You are correct, its enough with setting total
to false
Ref: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html#:~:text=before%20it%20was%20modified.-,Type%3A%20String%20to%20AttributeValue%20object%20map,-Key%20Length%20Constraints%3A%20Maximum as well as https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodbstreams.html#:~:text=%22BOOL%22%3A%20true-,OldImage,-(dict)%20%2D%2D
Looks like
OldImage
isn't optional, just likeNewImage
isn't.Also, it looks like many fields are annotated as
Optional
but the docs don't state they are (sayuserIdentity
andApproximateCreationDateTime
in the same file). Is this the desired behaviour?