Merge pull request 'Fix(python-generator): prevent from namespace name conflicts' (#58) from fix/python-namespace-name-conflict into main
Generate API reference / generate (push) Successful in 21s

Reviewed-on: #58
This commit was merged in pull request #58.
This commit is contained in:
jakob.scheid authored and Gitea committed 2026-09-29 18:18:14 +02:00
commit 6b19690dc9
3 files changed
+7 -1

No files matched your search

+1
View File
@@ -4,6 +4,7 @@
### Fixed
- Python namespace name conflict when package and module have the same name
- Internal namespace name error which occured when generating Python documentation with `.` as the project directory
## [0.2.0] - 2026-09-28
+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))