fix(python-generator): check for module namespace

Added a check whether a module namespace with the name off a directory
already exists before adding a package namespace for the directory.
This commit is contained in:
jakob.scheid committed 2026-09-29 18:02:15 +02:00
1 parent 7e03199615
commit 908e299fa0
1 file changed
+3 -1
+3 -1
View File
@@ -1107,7 +1107,9 @@ class PythonDocumentationGenerator:
)
for entry in directory.iterdir():
if entry.is_dir():
if entry.is_dir() and (
entry.parent / (f'{entry.stem}.py')
).resolve() not in [e.resolve() for e in entry.parent.iterdir()]:
namespace.add(self._namespace(entry))
elif entry.suffix == '.py':
namespace.add(PythonModuleNamespace(entry.stem))