Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Add typing to generated python code and documentation #1023

Closed
t92549 opened this issue Aug 11, 2022 · 2 comments · Fixed by #1049
Closed

Add typing to generated python code and documentation #1023

t92549 opened this issue Aug 11, 2022 · 2 comments · Fixed by #1049

Comments

@t92549
Copy link
Contributor

t92549 commented Aug 11, 2022

Typing could easily be added to the generated code by using the operation details.
For example, the options field is an optional map is strings, described like so:

{
    "name": "options",
    "className": "java.util.Map<java.lang.String,java.lang.String>",
    "required": false
}

This could be typed in Python like so:

options: t.Optional[t.Mapping[str, str]] = None

This would also allow for the generation of documentation using sphinx.

@t92549
Copy link
Contributor Author

t92549 commented Oct 19, 2022

We should use google style Python docstrings.
Python types for function arguments in the init, java return type of the Operation in docstring.

@t92549
Copy link
Contributor Author

t92549 commented Mar 6, 2023

Closed by #1049

@t92549 t92549 closed this as completed Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant