Skip to content

Commit

Permalink
Update ignore
Browse files Browse the repository at this point in the history
Method for updating the dictionary is ignored, as the update method of typedict have some problems (python/mypy#6462).
  • Loading branch information
xDaile committed Oct 10, 2022
1 parent 9643bdf commit a9da2ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions iib/web/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ def to_json(self, verbose: Optional[bool] = True) -> AddRequestResponse:
:rtype: dict
"""
rv = cast(AddRequestResponse, super().to_json(verbose=verbose))
rv.update(self.get_common_index_image_json())
rv.update(self.get_common_index_image_json()) # type: ignore
rv['organization'] = self.organization
rv['omps_operator_version'] = {}
if self.omps_operator_version:
Expand Down Expand Up @@ -1205,7 +1205,7 @@ def to_json(self, verbose: Optional[bool] = True) -> AddRmRequestResponseBase:
:rtype: dict
"""
rv = cast(AddRmRequestResponseBase, super().to_json(verbose=verbose))
rv.update(self.get_common_index_image_json())
rv.update(self.get_common_index_image_json()) # type: ignore
rv['removed_operators'] = [operator.name for operator in self.operators]
return rv

Expand Down Expand Up @@ -1713,7 +1713,7 @@ class RequestCreateEmptyIndex(Request, RequestIndexImageMixin):
output_fbc = False

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

Expand Down Expand Up @@ -1794,7 +1794,7 @@ def to_json(self, verbose: Optional[bool] = True) -> CreateEmptyIndexRequestResp
:rtype: dict
"""
rv = super().to_json(verbose=verbose)
rv.update(self.get_common_index_image_json())
rv.update(self.get_common_index_image_json()) # type: ignore
rv.pop('bundles')
rv.pop('bundle_mapping')
rv.pop('organization')
Expand All @@ -1804,7 +1804,7 @@ def to_json(self, verbose: Optional[bool] = True) -> CreateEmptyIndexRequestResp
rv.pop('internal_index_image_copy')
rv.pop('internal_index_image_copy_resolved')
result = cast(CreateEmptyIndexRequestResponse, rv)
result['labels'] = cast(Dict[str, str], self.labels)
result['labels'] = self.labels
return result

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

0 comments on commit a9da2ac

Please sign in to comment.