generated from jCloud/repository-template
Fix(python-generator): prevent from internal namespace error #55
@@ -1096,7 +1096,15 @@ class PythonDocumentationGenerator:
|
|||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
|
|
||||||
def _namespace(self, directory: pathlib.Path) -> PythonPackageNamespace:
|
def _namespace(self, directory: pathlib.Path) -> PythonPackageNamespace:
|
||||||
namespace = PythonPackageNamespace(directory.name, [])
|
namespace = PythonPackageNamespace(
|
||||||
|
# fallback for the case that the path it '/'. In this case, the
|
||||||
|
# name would be ''. The fallback value is irrelevant; the name is
|
||||||
|
# only specified because PythonPackageNamespace requires
|
||||||
|
# specifying it. The name will not be included in the generated
|
||||||
|
# output.
|
||||||
|
directory.resolve().name or 'project',
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
for entry in directory.iterdir():
|
for entry in directory.iterdir():
|
||||||
if entry.is_dir():
|
if entry.is_dir():
|
||||||
|
|||||||
Reference in new issue
Block a user