From 9941649841f70f92ea71669929714b92aa01df80 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Sun, 27 Sep 2026 22:07:12 +0200 Subject: [PATCH] feat(python-generator): check type at package namespace comparision Added type check to the Python package namespace comparision function. --- src/jcloud_docsgen/core/python/namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jcloud_docsgen/core/python/namespaces.py b/src/jcloud_docsgen/core/python/namespaces.py index 073a73f..706a816 100644 --- a/src/jcloud_docsgen/core/python/namespaces.py +++ b/src/jcloud_docsgen/core/python/namespaces.py @@ -156,7 +156,7 @@ class PythonPackageNamespace(PythonNamespace): # For performance reasons, is not called self.sub_namespace_names # if the name attribute does not match, which can be quickly # verified - if self.name != value.name: + if not (isinstance(value, type(self)) and self.name == value.name): return False return value.sub_namespace_names() == self.sub_namespace_names()