diff --git a/docs/reference/jcloud_docsgen/__init__.md b/docs/reference/jcloud_docsgen/__init__.md new file mode 100644 index 0000000..81a908e --- /dev/null +++ b/docs/reference/jcloud_docsgen/__init__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.__init__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/__main__.md b/docs/reference/jcloud_docsgen/__main__.md new file mode 100644 index 0000000..d6e5541 --- /dev/null +++ b/docs/reference/jcloud_docsgen/__main__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.__main__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/cli/__init__.md b/docs/reference/jcloud_docsgen/cli/__init__.md new file mode 100644 index 0000000..ddc204f --- /dev/null +++ b/docs/reference/jcloud_docsgen/cli/__init__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.cli.__init__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/cli/cli.md b/docs/reference/jcloud_docsgen/cli/cli.md new file mode 100644 index 0000000..04ca531 --- /dev/null +++ b/docs/reference/jcloud_docsgen/cli/cli.md @@ -0,0 +1,107 @@ +# Module `jcloud_docsgen.cli.cli` + +The command line interface + +## Function `existing_directory` + +### Function signature + +```python +existing_directory(path: str) -> pathlib.Path +``` + +### Returns + +Return type: `pathlib.Path` + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `path` | `str` | normal | -- | -- | + +## Function `error` + +Shows an error message and returns the exit code. + + +### Function signature + +```python +error(message: str, exit_code: int = 1) +``` + + + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `message` | `str` | normal | -- | The error message to show. | +| `exit_code` | `int` | normal | `1` | The exit code. | + + + + + + + +### Docstring + +Shows an error message and returns the exit code. + +:param message: The error message to show. +:type message: str +:param exit_code: The exit code. +:type exit_code: int + +## Function `create_argument_parser` + +Prepares a parser to parse the command-line arguments using +argparse. + +### Function signature + +```python +create_argument_parser() -> argparse.ArgumentParser +``` + +### Returns + +The parser. + +Return type: `argparse.ArgumentParser` + + + + + + + + + +### Docstring + +Prepares a parser to parse the command-line arguments using +argparse. + +:return: The parser. +:rtype: argparse.ArgumentParser + +## Function `main` + +### Function signature + +```python +main(argv=None) -> int +``` + +### Returns + +Return type: `int` + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `argv` | -- | normal | `None` | -- | \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/cli/languages/__init__.md b/docs/reference/jcloud_docsgen/cli/languages/__init__.md new file mode 100644 index 0000000..e9b3e13 --- /dev/null +++ b/docs/reference/jcloud_docsgen/cli/languages/__init__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.cli.languages.__init__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/cli/languages/python.md b/docs/reference/jcloud_docsgen/cli/languages/python.md new file mode 100644 index 0000000..eba14f1 --- /dev/null +++ b/docs/reference/jcloud_docsgen/cli/languages/python.md @@ -0,0 +1,156 @@ +# Module `jcloud_docsgen.cli.languages.python` + +## Function `parse_sections_list` + +Returns a Python definition documentation sections list from the +sections list to be included and the sections list to be excluded. +These lists both consist of the sections as strings which contain +the section name. + +### Function signature + +```python +parse_sections_list(include_sections: list[str] | None = None, exclude_sections: list[str] = []) -> PythonDefinitionDocumentationIncludeSections +``` + +### Returns + +The Python definition documentation sections object. + +Return type: `PythonDefinitionDocumentationIncludeSections` + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `include_sections` | `list[str] | None` | normal | `None` | The list of sections to be included. | +| `exclude_sections` | `list[str]` | normal | `[]` | The list of sections to be excluded. | + + + + + + + +### Docstring + +Returns a Python definition documentation sections list from the +sections list to be included and the sections list to be excluded. +These lists both consist of the sections as strings which contain +the section name. + +:param include_sections: The list of sections to be included. +:type include_sections: list[str] | None +:param exclude_sections: The list of sections to be excluded. +:type exclude_sections: list[str] + +:return: The Python definition documentation sections object. +:rtype: PythonDefinitionDocumentationIncludeSections + +## Function `_generate` + +Generates the documentation for a Python project. + + +### Function signature + +```python +_generate(project_directory: pathlib.Path, output_directory: pathlib.Path, *, include_sections: PythonDefinitionDocumentationIncludeSections = PythonDefinitionDocumentationIncludeSections(), allow_html: bool = False, allow_tables: bool = False, force: bool = False) -> None +``` + +### Returns + +Return type: `None` + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `project_directory` | `pathlib.Path` | normal | -- | The project directory. | +| `output_directory` | `pathlib.Path` | normal | -- | The output directory. | +| `include_sections` | `PythonDefinitionDocumentationIncludeSections` | keyword-only | `PythonDefinitionDocumentationIncludeSections()` | The sections to be included in the documentation. | +| `allow_html` | `bool` | keyword-only | `False` | Indicates whether HTML is allowed to appear in the generated documentation. | +| `allow_tables` | `bool` | keyword-only | `False` | Indicates whether Markdown tables are allowed. Warning: Markdown tables are not CommonMark. | +| `force` | `bool` | keyword-only | `False` | Indicates whether the output directory shall be overwritten if it is not empty. | + + + + + + + +### Docstring + +Generates the documentation for a Python project. + +:param project_directory: The project directory. +:type project_directory: pathlib.Path +:param output_directory: The output directory. +:type output_directory: pathlib.Path +:param include_sections: The sections to be included in the + documentation. +:type include_sections: PythonDefinitionDocumentationIncludeSections +:param allow_html: Indicates whether HTML is allowed to appear in + the generated documentation. +:type allow_html: bool +:param allow_tables: Indicates whether Markdown tables are allowed. + Warning: Markdown tables are not CommonMark. +:param force: Indicates whether the output directory shall be + overwritten if it is not empty. +:type force: bool + +## Function `generate` + +Generates the documentation for a Python project. + + +### Function signature + +```python +generate(project_directory: pathlib.Path, output_directory: pathlib.Path, *, include_sections: list[str] | None = None, exclude_sections: list[str] = [], allow_html: bool = False, allow_tables: bool = False, force: bool = False) -> None +``` + +### Returns + +Return type: `None` + +### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `project_directory` | `pathlib.Path` | normal | -- | The project directory. | +| `output_directory` | `pathlib.Path` | normal | -- | The output directory. | +| `include_sections` | `list[str] | None` | keyword-only | `None` | The sections to be included in the documentation. | +| `exclude_sections` | `list[str]` | keyword-only | `[]` | The sections to be excluded in the documentation. | +| `allow_html` | `bool` | keyword-only | `False` | Indicates whether HTML is allowed to appear in the generated documentation. | +| `allow_tables` | `bool` | keyword-only | `False` | Indicates whether Markdown tables are allowed. Warning: Markdown tables are not CommonMark. | +| `force` | `bool` | keyword-only | `False` | Indicates whether the output directory shall be overwritten if it is not empty. | + + + + + + + +### Docstring + +Generates the documentation for a Python project. + +:param project_directory: The project directory. +:type project_directory: pathlib.Path +:param output_directory: The output directory. +:type output_directory: pathlib.Path +:param include_sections: The sections to be included in the + documentation. +:type include_sections: list[str] | None +:param exclude_sections: The sections to be excluded in the + documentation. +:type exclude_sections: list[str] +:param allow_html: Indicates whether HTML is allowed to appear in + the generated documentation. +:type allow_html: bool +:param allow_tables: Indicates whether Markdown tables are allowed. + Warning: Markdown tables are not CommonMark. +:param force: Indicates whether the output directory shall be + overwritten if it is not empty. +:type force: bool \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/core/__init__.md b/docs/reference/jcloud_docsgen/core/__init__.md new file mode 100644 index 0000000..b8999f7 --- /dev/null +++ b/docs/reference/jcloud_docsgen/core/__init__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.core.__init__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/core/python/__init__.md b/docs/reference/jcloud_docsgen/core/python/__init__.md new file mode 100644 index 0000000..e7bfb18 --- /dev/null +++ b/docs/reference/jcloud_docsgen/core/python/__init__.md @@ -0,0 +1 @@ +# Module `jcloud_docsgen.core.python.__init__` \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/core/python/_core.md b/docs/reference/jcloud_docsgen/core/python/_core.md index 7286ece..adb2850 100644 --- a/docs/reference/jcloud_docsgen/core/python/_core.md +++ b/docs/reference/jcloud_docsgen/core/python/_core.md @@ -47,12 +47,12 @@ keyword-only arguments and the var-keyword-argument if there is one. ### Function signature ```python -_group_argument_list(argument_list: list[PythonFunctionArgument]) -> tuple[list[PythonFunctionArgument], list[PythonFunctionArgument], Union[PythonFunctionArgument, None], list[PythonFunctionArgument], Union[PythonFunctionArgument, None]] +_group_argument_list(argument_list: list[PythonFunctionArgument]) -> _Arguments ``` ### Returns -Return type: `tuple[list[PythonFunctionArgument], list[PythonFunctionArgument], Union[PythonFunctionArgument, None], list[PythonFunctionArgument], Union[PythonFunctionArgument, None]]` +Return type: `_Arguments` ### Parameters @@ -75,7 +75,7 @@ keyword-only arguments and the var-keyword-argument if there is one. :param argument_list: The argument list. :type argument_list: list[PythonFunctionArgument] -:rtype: tuple[list[PythonFunctionArgument], list[PythonFunctionArgument], Union[PythonFunctionArgument, None], list[PythonFunctionArgument], Union[PythonFunctionArgument, None]] +:rtype: _Arguments ## Function `_signature_argument_list` @@ -224,7 +224,7 @@ Checks whether the docstring is a docstring or an empty docstring. ### Function signature ```python -_is_docstring(docstring: Union[str, PythonDocstring, None]) -> bool +_is_docstring(docstring: str | PythonDocstring | None) -> bool ``` ### Returns @@ -237,7 +237,7 @@ Return type: `bool` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | -| `docstring` | `Union[str, PythonDocstring, None]` | normal | -- | The docstring. | +| `docstring` | `str | PythonDocstring | None` | normal | -- | The docstring. | @@ -250,7 +250,7 @@ Return type: `bool` Checks whether the docstring is a docstring or an empty docstring. :param docstring: The docstring. -:type docstring: Union[str, PythonDocstring, None] +:type docstring: str | PythonDocstring | None :return: Whether there is a docstring. :rtype: bool @@ -975,7 +975,7 @@ A documentation generator for a Python module. ##### Method signature ```python -__init__(self, module_path: ExistingFile, src_directory: Union[ExistingDirectory, None] = None, include_sections: PythonDefinitionDocumentationIncludeSections = PythonDefinitionDocumentationIncludeSections(), **kwargs) -> None +__init__(self, module_path: pathlib.Path, src_directory: pathlib.Path | None = None, include_sections: PythonDefinitionDocumentationIncludeSections = PythonDefinitionDocumentationIncludeSections(), **kwargs) -> None ``` ##### Returns @@ -987,8 +987,8 @@ Return type: `None` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | -| `module_path` | `ExistingFile` | normal | -- | -- | -| `src_directory` | `Union[ExistingDirectory, None]` | normal | `None` | -- | +| `module_path` | `pathlib.Path` | normal | -- | -- | +| `src_directory` | `pathlib.Path | None` | normal | `None` | -- | | `include_sections` | `PythonDefinitionDocumentationIncludeSections` | normal | `PythonDefinitionDocumentationIncludeSections()` | -- | | `kwargs` | -- | kwargs | -- | -- | @@ -1125,11 +1125,11 @@ Generates the documentation in the markdown format. A documentation generator for a Python module. :param module_path: The path of the module file. -:type module_path: ExistingFile +:type module_path: pathlib.Path :param src_directory: The directory of the source code. It is optional and only used for making the module identifiers in the documentation relative. -:type src_directory: Union[ExistingDirectory, None] +:type src_directory: pathlib.Path | None :param include_sections: The sections that will be included. :type include_sections: PythonDefinitionDocumentationIncludeSections :param kwargs: The options for ``PythonDefinitionDocumentationGenerator``. @@ -1197,7 +1197,7 @@ The class for the documentation generator. ##### Method signature ```python -__init__(self, project_directory: ExistingDirectory, docs_directory: ExistingDirectory, include_sections: PythonDefinitionDocumentationIncludeSections = PythonDefinitionDocumentationIncludeSections(), **kwargs) -> None +__init__(self, project_directory: pathlib.Path, docs_directory: pathlib.Path, include_sections: PythonDefinitionDocumentationIncludeSections = PythonDefinitionDocumentationIncludeSections(), **kwargs) -> None ``` ##### Returns @@ -1209,8 +1209,8 @@ Return type: `None` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | -| `project_directory` | `ExistingDirectory` | normal | -- | -- | -| `docs_directory` | `ExistingDirectory` | normal | -- | -- | +| `project_directory` | `pathlib.Path` | normal | -- | -- | +| `docs_directory` | `pathlib.Path` | normal | -- | -- | | `include_sections` | `PythonDefinitionDocumentationIncludeSections` | normal | `PythonDefinitionDocumentationIncludeSections()` | -- | | `kwargs` | -- | kwargs | -- | -- | @@ -1241,14 +1241,14 @@ Returns the project as a namespace. ##### Method signature ```python -namespace(self) -> list[PythonPackageNamespace] +namespace(self) -> PythonPackageNamespace ``` ##### Returns The project as a namespace. -Return type: `list[PythonPackageNamespace]` +Return type: `PythonPackageNamespace` ##### Parameters @@ -1267,7 +1267,7 @@ Return type: `list[PythonPackageNamespace]` Returns the project as a namespace. :return: The project as a namespace. -:rtype: list[PythonPackageNamespace] +:rtype: PythonPackageNamespace: #### Method `generate_documentation` @@ -1277,7 +1277,7 @@ documentation directory. ##### Method signature ```python -generate_documentation(self) -> None +generate_documentation(self, force: bool = False) -> None ``` ##### Returns @@ -1289,8 +1289,13 @@ Return type: `None` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | +| `force` | `bool` | normal | `False` | Indicates whether existing contents of the output directory shall be overwritten. If ``True``, all contents of the output directory will be deleted first. | +##### Exceptions +| Exception | Description | +| --- | --- | +| `DirectoryNotEmptyError` | If ``force`` is ``False`` and the output directory is not empty. | @@ -1301,6 +1306,16 @@ Return type: `None` Generates the full project documentation and writes it to the documentation directory. +:param force: Indicates whether existing contents of the output + directory shall be overwritten. If ``True``, all + contents of the output directory will be deleted + first. +:type force: bool + +:raises DirectoryNotEmptyError: If ``force`` is ``False`` and + the output directory is not + empty. + @@ -1310,9 +1325,9 @@ documentation directory. The class for the documentation generator. :param project_directory: The directory of the project. -:type project_directory: ExistingDirectory +:type project_directory: pathlib.Path :param docs_directory: The directory for the generated documentation. -:type docs_directory: ExistingDirectory +:type docs_directory: pathlib.Path :param include_sections: The sections to be included in the documentation. :type include_sections: PythonDefinitionDocumentationIncludeSections :param kwargs: The options for ``PythonDefinitionDocumentationGenerator``. \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/core/python/arguments.md b/docs/reference/jcloud_docsgen/core/python/arguments.md index 683fc3c..c2f5fd6 100644 --- a/docs/reference/jcloud_docsgen/core/python/arguments.md +++ b/docs/reference/jcloud_docsgen/core/python/arguments.md @@ -20,7 +20,7 @@ Represents an argument of a Python function. ##### Method signature ```python -__init__(self, name: str, kind: PythonArgumentKind, default: Union[str, None], annotation: Union[str, None]) -> None +__init__(self, name: str, kind: PythonArgumentKind, default: str | None, annotation: str | None) -> None ``` ##### Returns @@ -34,8 +34,8 @@ Return type: `None` | `self` | -- | normal | -- | -- | | `name` | `str` | normal | -- | -- | | `kind` | `PythonArgumentKind` | normal | -- | -- | -| `default` | `Union[str, None]` | normal | -- | -- | -| `annotation` | `Union[str, None]` | normal | -- | -- | +| `default` | `str | None` | normal | -- | -- | +| `annotation` | `str | None` | normal | -- | -- | #### Method `__eq__` @@ -123,9 +123,9 @@ Represents an argument of a Python function. :param kind: The kind of the argument. :type kind: ArgumentKind :param default: The default value of the argument. -:type default: Union[str, None] +:type default: str | None :param annotation: The type annotation of the argument. -:type annotation: Union[str, None] +:type annotation: str | None ## Class `PythonASTArgumentsListParser` diff --git a/docs/reference/jcloud_docsgen/core/python/definitions.md b/docs/reference/jcloud_docsgen/core/python/definitions.md index 14e1d1a..cfc9956 100644 --- a/docs/reference/jcloud_docsgen/core/python/definitions.md +++ b/docs/reference/jcloud_docsgen/core/python/definitions.md @@ -8,20 +8,20 @@ not ``None``. ### Function signature ```python -_python_docstring(doc: Union[str, None]) -> Union[PythonDocstring, None] +_python_docstring(doc: str | None) -> PythonDocstring | None ``` ### Returns The PythonDocstring object or ``None``. -Return type: `Union[PythonDocstring, None]` +Return type: `PythonDocstring | None` ### Parameters | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | -| `doc` | `Union[str, None]` | normal | -- | The docstring. | +| `doc` | `str | None` | normal | -- | The docstring. | @@ -35,10 +35,10 @@ Returns the PythonDocstring object if the docstring is a string and not ``None``. :param doc: The docstring. -:type doc: Union[str, None] +:type doc: str | None :return: The PythonDocstring object or ``None``. -:rtype: Union[PythonDocstring, None] +:rtype: PythonDocstring | None ## Class `PythonDefinition` @@ -54,7 +54,7 @@ function definition) classes. ##### Method signature ```python -__init__(self, name: str, doc: Union[PythonDocstring, None], decorators: list[str]) -> None +__init__(self, name: str, doc: PythonDocstring | None, decorators: list[str]) -> None ``` ##### Returns @@ -67,7 +67,7 @@ Return type: `None` | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | | `name` | `str` | normal | -- | -- | -| `doc` | `Union[PythonDocstring, None]` | normal | -- | -- | +| `doc` | `PythonDocstring | None` | normal | -- | -- | | `decorators` | `list[str]` | normal | -- | -- | #### Method `_arg_list` @@ -176,7 +176,7 @@ function definition) classes. :param name: The name of the definition. :type name: str :param doc: The docstring. -:type doc: Union[PythonDocstring, None] +:type doc: PythonDocstring | None :param decorators: The definition decorators. :type decorators: list[str] @@ -199,7 +199,7 @@ definition. ##### Method signature ```python -__init__(self, name: str, args: list[PythonFunctionArgument], returns: Union[str, None], doc: Union[PythonDocstring, None], decorators: list[str]) -> None +__init__(self, name: str, args: list[PythonFunctionArgument], returns: str | None, doc: PythonDocstring | None, decorators: list[str]) -> None ``` ##### Returns @@ -213,8 +213,8 @@ Return type: `None` | `self` | -- | normal | -- | -- | | `name` | `str` | normal | -- | -- | | `args` | `list[PythonFunctionArgument]` | normal | -- | -- | -| `returns` | `Union[str, None]` | normal | -- | -- | -| `doc` | `Union[PythonDocstring, None]` | normal | -- | -- | +| `returns` | `str | None` | normal | -- | -- | +| `doc` | `PythonDocstring | None` | normal | -- | -- | | `decorators` | `list[str]` | normal | -- | -- | #### Method `_arg_list` @@ -288,9 +288,9 @@ definition. :param args: The arguments. :type args: list[PythonFunctionArgument] :param returns: The return type of the function or class. -:type returns: Union[str, None] +:type returns: str | None :param doc: The docstring. -:type doc: Union[PythonDocstring, None] +:type doc: PythonDocstring | None :param decorators: The definition decorators. :type decorators: list[str] @@ -322,9 +322,9 @@ definition. :param args: The arguments. :type args: list[PythonFunctionArgument] :param returns: The return type of the function or class. -:type returns: Union[str, None] +:type returns: str | None :param doc: The docstring. -:type doc: Union[PythonDocstring, None] +:type doc: PythonDocstring | None :param decorators: The definition decorators. :type decorators: list[str] @@ -347,7 +347,7 @@ A PythonDefinition subclass representing a Python class definition. ##### Method signature ```python -__init__(self, name: str, bases: list[str], doc: Union[PythonDocstring, None], decorators: list[str], body: list[PythonDefinition]) -> None +__init__(self, name: str, bases: list[str], doc: PythonDocstring | None, decorators: list[str], body: list[PythonDefinition]) -> None ``` ##### Returns @@ -361,7 +361,7 @@ Return type: `None` | `self` | -- | normal | -- | -- | | `name` | `str` | normal | -- | -- | | `bases` | `list[str]` | normal | -- | -- | -| `doc` | `Union[PythonDocstring, None]` | normal | -- | -- | +| `doc` | `PythonDocstring | None` | normal | -- | -- | | `decorators` | `list[str]` | normal | -- | -- | | `body` | `list[PythonDefinition]` | normal | -- | -- | @@ -435,7 +435,7 @@ A PythonDefinition subclass representing a Python class definition. :param bases: The base classes. :type bases: list[str] :param doc: The docstring. -:type doc: Union[PythonDocstring, None] +:type doc: PythonDocstring | None :param decorators: The definition decorators. :type decorators: list[str] :param body: diff --git a/docs/reference/jcloud_docsgen/core/python/namespaces.md b/docs/reference/jcloud_docsgen/core/python/namespaces.md index 065bafe..ff1c390 100644 --- a/docs/reference/jcloud_docsgen/core/python/namespaces.md +++ b/docs/reference/jcloud_docsgen/core/python/namespaces.md @@ -73,7 +73,7 @@ A subclass of ``PythonNamespace`` for Python package namespaces. ##### Method signature ```python -__init__(self, name: str, sub_namespaces: List[PythonNamespace]) -> None +__init__(self, name: str, sub_namespaces: list[PythonNamespace]) -> None ``` ##### Returns @@ -86,7 +86,7 @@ Return type: `None` | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | | `name` | `str` | normal | -- | -- | -| `sub_namespaces` | `List[PythonNamespace]` | normal | -- | -- | +| `sub_namespaces` | `list[PythonNamespace]` | normal | -- | -- | #### Method `namespace` @@ -96,7 +96,7 @@ Returns the namespace object with a specific identifier, such as ##### Method signature ```python -namespace(self, sub_namespaces: List[str]) -> PythonNamespace +namespace(self, sub_namespaces: list[str]) -> PythonNamespace ``` ##### Returns @@ -110,7 +110,7 @@ Return type: `PythonNamespace` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | | `self` | -- | normal | -- | -- | -| `sub_namespaces` | `List[str]` | normal | -- | The identifier of the namespace. | +| `sub_namespaces` | `list[str]` | normal | -- | The identifier of the namespace. | ##### Exceptions @@ -347,12 +347,12 @@ Adds a namespace. ##### Method signature ```python -sub_namespaces(self) -> List[PythonNamespace] +sub_namespaces(self) -> list[PythonNamespace] ``` ##### Returns -Return type: `List[PythonNamespace]` +Return type: `list[PythonNamespace]` ##### Parameters diff --git a/docs/reference/jcloud_docsgen/exceptions.md b/docs/reference/jcloud_docsgen/exceptions.md index 657dd30..d7cc5f1 100644 --- a/docs/reference/jcloud_docsgen/exceptions.md +++ b/docs/reference/jcloud_docsgen/exceptions.md @@ -250,4 +250,41 @@ Base class for Python definition errors. ### Base classes -- `PythonDefinitionError` \ No newline at end of file +- `PythonDefinitionError` + +## Class `DirectoryNotEmptyError` + +Directory is not empty. + +### Base classes + +- `OSError` + +### Body + +#### Constructor (method `__init__`) + +##### Method signature + +```python +__init__(self, filename: str | None = None) -> None +``` + +##### Returns + +Return type: `None` + +##### Parameters + +| Parameter | Type | Kind | Default value | Description | +| --- | --- | --- | --- | --- | +| `self` | -- | normal | -- | -- | +| `filename` | `str | None` | normal | `None` | -- | + + + + + +### Docstring + +Directory is not empty. \ No newline at end of file diff --git a/docs/reference/jcloud_docsgen/utils.md b/docs/reference/jcloud_docsgen/utils.md index 28ea355..a875af1 100644 --- a/docs/reference/jcloud_docsgen/utils.md +++ b/docs/reference/jcloud_docsgen/utils.md @@ -37,7 +37,11 @@ Return type: `None` | `args` | -- | vararg | -- | -- | | `kwargs` | -- | kwargs | -- | -- | +### Decorators +```python +deprecated('Use pathlib.Path instead.') +``` @@ -84,7 +88,11 @@ Return type: `None` | `args` | -- | vararg | -- | -- | | `kwargs` | -- | kwargs | -- | -- | +### Decorators +```python +deprecated('Use pathlib.Path instead.') +``` @@ -230,7 +238,7 @@ attribute) ### Function signature ```python -assert_that_is_instance(obj: object, class_or_tuple: Union[type, types.UnionType, tuple[type, ...]]) -> None +assert_that_is_instance(obj: object, class_or_tuple: type | types.UnionType | tuple[type, ...]) -> None ``` ### Returns @@ -242,7 +250,7 @@ Return type: `None` | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | | `obj` | `object` | normal | -- | -- | -| `class_or_tuple` | `Union[type, types.UnionType, tuple[type, ...]]` | normal | -- | -- | +| `class_or_tuple` | `type | types.UnionType | tuple[type, ...]` | normal | -- | -- | ## Function `non_empty_str` @@ -256,20 +264,20 @@ Please note: values are stripped, i. e. if the value consists only ### Function signature ```python -non_empty_str(value: Union[str, None]) -> Union[str, None] +non_empty_str(value: str | None) -> str | None ``` ### Returns The value or ``None``. -Return type: `Union[str, None]` +Return type: `str | None` ### Parameters | Parameter | Type | Kind | Default value | Description | | --- | --- | --- | --- | --- | -| `value` | `Union[str, None]` | normal | -- | The value. | +| `value` | `str | None` | normal | -- | The value. | @@ -287,10 +295,10 @@ Please note: values are stripped, i. e. if the value consists only of spaces, it is also considered empty. :param value: The value. -:type value: Union[str, None] +:type value: str | None :return: The value or ``None``. -:rtype: Union[str, None] +:rtype: str | None ## Function `get_relative_path_segments`