feat(python-generator): check type at package namespace comparision

Added type check to the Python package namespace comparision function.
This commit is contained in:
jakob.scheid committed 2026-09-27 22:15:57 +02:00
1 parent f102fa80ce
commit ec262ef99e
1 file changed
+1 -1
+1 -1
View File
@@ -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()