generated from jCloud/repository-template
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
Generate API reference / generate (push) Successful in 21s
Reviewed-on: #58
This commit was merged in pull request #58.
This commit is contained in:
3 files changed
+7
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Module 2.
|
||||
"""
|
||||
Reference in new issue
Block a user