From 8399c0f889d16790a1e7697917eaad26151643ab Mon Sep 17 00:00:00 2001 From: Ben Fiola Date: Sun, 30 Jun 2024 10:49:45 -0700 Subject: [PATCH] Remove issubclass check on resource -> DataclassDictMixIn within GenericClient.convert_to_resource --- lightkube/core/generic_client.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/lightkube/core/generic_client.py b/lightkube/core/generic_client.py index bc85823..1211adc 100644 --- a/lightkube/core/generic_client.py +++ b/lightkube/core/generic_client.py @@ -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 @@ -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)