Skip to content

Commit

Permalink
Remove issubclass check on resource -> DataclassDictMixIn within Gene…
Browse files Browse the repository at this point in the history
…ricClient.convert_to_resource
  • Loading branch information
benfiola authored and gtsystem committed Jul 1, 2024
1 parent 1f05156 commit 8399c0f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lightkube/core/generic_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import httpx

from . import dataclasses_dict as dc_d
from . import resource as r
from ..config.kubeconfig import KubeConfig, SingleConfig, DEFAULT_KUBECONFIG
from ..config import client_adapter
Expand Down Expand Up @@ -195,8 +194,6 @@ def build_adapter_request(self, br: BasicRequest):

def convert_to_resource(self, res: Type[r.Resource], item: dict) -> r.Resource:
resource_def = r.api_info(res).resource
if not issubclass(res, dc_d.DataclassDictMixIn):
raise NotImplementedError(res)
item.setdefault("apiVersion", resource_def.api_version)
item.setdefault("kind", resource_def.kind)
return res.from_dict(item, lazy=self._lazy)
Expand Down

0 comments on commit 8399c0f

Please sign in to comment.