@@ -29,24 +29,24 @@ class SqsMsgAttributeModel(BaseModel):
2929 # labels with the format .custom-data-type.
3030 # https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes
3131 # @validator("dataType")
32- # def valid_type(cls, v): # noqa: VNE001,E800 # noqa: E800
33- # pattern = re.compile("Number.*|String.*|Binary.*") # noqa: E800
34- # if not pattern.match(v): # noqa: E800
35- # raise TypeError("data type is invalid") # noqa: E800
36- # return v # noqa: E800
32+ # def valid_type(cls, v): # noqa: VNE001,ERA001 # noqa: ERA001
33+ # pattern = re.compile("Number.*|String.*|Binary.*") # noqa: ERA001
34+ # if not pattern.match(v): # noqa: ERA001
35+ # raise TypeError("data type is invalid") # noqa: ERA001
36+ # return v # noqa: ERA001
3737 #
3838 # # validate that dataType and value are not None and match
3939 # @root_validator
40- # def check_str_and_binary_values(cls, values): # noqa: E800
41- # binary_val, str_val = values.get("binaryValue", ""), values.get("stringValue", "") # noqa: E800
42- # data_type = values.get("dataType") # noqa: E800
43- # if not str_val and not binary_val: # noqa: E800
44- # raise TypeError("both binaryValue and stringValue are missing") # noqa: E800
45- # if data_type.startswith("Binary") and not binary_val: # noqa: E800
46- # raise TypeError("binaryValue is missing") # noqa: E800
47- # if (data_type.startswith("String") or data_type.startswith("Number")) and not str_val: # noqa: E800
48- # raise TypeError("stringValue is missing") # noqa: E800
49- # return values # noqa: E800
40+ # def check_str_and_binary_values(cls, values): # noqa: ERA001
41+ # binary_val, str_val = values.get("binaryValue", ""), values.get("stringValue", "") # noqa: ERA001
42+ # data_type = values.get("dataType") # noqa: ERA001
43+ # if not str_val and not binary_val: # noqa: ERA001
44+ # raise TypeError("both binaryValue and stringValue are missing") # noqa: ERA001
45+ # if data_type.startswith("Binary") and not binary_val: # noqa: ERA001
46+ # raise TypeError("binaryValue is missing") # noqa: ERA001
47+ # if (data_type.startswith("String") or data_type.startswith("Number")) and not str_val: # noqa: ERA001
48+ # raise TypeError("stringValue is missing") # noqa: ERA001
49+ # return values # noqa: ERA001
5050
5151
5252class SqsRecordModel (BaseModel ):
0 commit comments