Skip to content

Commit 0a3befb

Browse files
committed
Update ignore
Method for updating the dictionary is ignored, as the update method of typedict have some problems (python/mypy#6462).
1 parent 230365d commit 0a3befb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎iib/web/models.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def to_json(self, verbose: Optional[bool] = True) -> AddRequestResponse:
11141114
:rtype: dict
11151115
"""
11161116
rv = cast(AddRequestResponse, super().to_json(verbose=verbose))
1117-
rv.update(self.get_common_index_image_json())
1117+
rv.update(self.get_common_index_image_json()) # type: ignore
11181118
rv['organization'] = self.organization
11191119
rv['omps_operator_version'] = {}
11201120
if self.omps_operator_version:
@@ -1205,7 +1205,7 @@ def to_json(self, verbose: Optional[bool] = True) -> AddRmRequestResponseBase:
12051205
:rtype: dict
12061206
"""
12071207
rv = cast(AddRmRequestResponseBase, super().to_json(verbose=verbose))
1208-
rv.update(self.get_common_index_image_json())
1208+
rv.update(self.get_common_index_image_json()) # type: ignore
12091209
rv['removed_operators'] = [operator.name for operator in self.operators]
12101210
return rv
12111211

@@ -1713,7 +1713,7 @@ class RequestCreateEmptyIndex(Request, RequestIndexImageMixin):
17131713
output_fbc = False
17141714

17151715
@property
1716-
def labels(self) -> Optional[Dict[str, Any]]:
1716+
def labels(self) -> Optional[Dict[str, str]]:
17171717
"""Return the Python representation of the JSON labels."""
17181718
return json.loads(self._labels) if self._labels else None
17191719

@@ -1794,7 +1794,7 @@ def to_json(self, verbose: Optional[bool] = True) -> CreateEmptyIndexRequestResp
17941794
:rtype: dict
17951795
"""
17961796
rv = super().to_json(verbose=verbose)
1797-
rv.update(self.get_common_index_image_json())
1797+
rv.update(self.get_common_index_image_json()) # type: ignore
17981798
rv.pop('bundles')
17991799
rv.pop('bundle_mapping')
18001800
rv.pop('organization')
@@ -1804,7 +1804,7 @@ def to_json(self, verbose: Optional[bool] = True) -> CreateEmptyIndexRequestResp
18041804
rv.pop('internal_index_image_copy')
18051805
rv.pop('internal_index_image_copy_resolved')
18061806
result = cast(CreateEmptyIndexRequestResponse, rv)
1807-
result['labels'] = cast(Dict[str, str], self.labels)
1807+
result['labels'] = self.labels
18081808
return result
18091809

18101810
def get_mutable_keys(self) -> Set[str]:
@@ -1912,7 +1912,7 @@ def to_json(self, verbose: Optional[bool] = True) -> RecursiveRelatedBundlesRequ
19121912
:return: a dictionary representing the JSON of the build request
19131913
:rtype: dict
19141914
"""
1915-
rv = super().to_json(verbose=verbose)
1915+
rv = cast(RecursiveRelatedBundlesRequestResponse, super().to_json(verbose=verbose))
19161916
rv['parent_bundle_image'] = self.parent_bundle_image.pull_specification
19171917
rv['parent_bundle_image_resolved'] = getattr(
19181918
self.parent_bundle_image_resolved, 'pull_specification', None

0 commit comments

Comments
 (0)