From 0e063cad525035d7efa878513c6d1b9f9c85a46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20K=C3=A1cha?= <ph@cesnet.cz> Date: Thu, 2 Jul 2020 14:48:38 +0200 Subject: [PATCH] Fix for py3 more strict type checking --- typedcols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typedcols.py b/typedcols.py index a87f341..30ebccd 100644 --- a/typedcols.py +++ b/typedcols.py @@ -151,7 +151,7 @@ class TypedDict(collections.MutableMapping): for key, tdef in self.typedef.items(): if tdef.get("required", False) and not key in self.data: missing = missing + ((key,),) - elif recursive and issubclass(tdef["type"], TypedDict): + elif recursive and isinstance(tdef["type"], type) and issubclass(tdef["type"], TypedDict): try: self.data[key].checkRequired(recursive) except KeysRequired as e: -- GitLab