TechDebt: MyPy fixes (#6898)

This commit is contained in:
Bert Blommers 2023-10-10 23:09:03 +00:00 committed by GitHub
parent a23cef9985
commit f39bb45f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -878,7 +878,7 @@ class EventPattern:
event = json.loads(json.dumps(event))
return self._does_event_match(event, self._pattern)
def _does_event_match(self, event: Dict[str, Any], pattern: Dict[str, str]) -> bool:
def _does_event_match(self, event: Dict[str, Any], pattern: Dict[str, Any]) -> bool:
items_and_filters = [(event.get(k, UNDEFINED), v) for k, v in pattern.items()]
nested_filter_matches = [
self._does_event_match(item, nested_filter)

View File

@ -250,8 +250,8 @@ class Route53(BaseResponse):
is_truncated,
) = self.backend.list_resource_record_sets(
zoneid,
start_type=start_type,
start_name=start_name,
start_type=start_type, # type: ignore
start_name=start_name, # type: ignore
max_items=max_items,
)
r_template = template.render(

View File

@ -2328,7 +2328,7 @@ class S3Backend(BaseBackend, CloudWatchMetricProvider):
part_id: int,
src_bucket_name: str,
src_key_name: str,
src_version_id: str,
src_version_id: Optional[str],
start_byte: int,
end_byte: int,
) -> FakeKey:

View File

@ -1500,11 +1500,11 @@ class S3Response(BaseResponse):
bucket_name,
upload_id,
part_number,
src_bucket,
src_key,
src_version_id,
start_byte,
end_byte,
src_bucket_name=src_bucket,
src_key_name=src_key,
src_version_id=src_version_id,
start_byte=start_byte,
end_byte=end_byte,
)
else:
return 404, response_headers, ""