Skip to content

Commit

Permalink
Add docstring params
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Aug 28, 2023
1 parent a3c40c6 commit 6a889e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions linodecli/baked/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def __init__(self, name, schema, prefix=None, nested_list_depth=0):
:param prefix: The json path style prefix (dot notation) to this schema
in the response object
:type prefix: str
:param nested_list_depth: The number of nested lists this attribute is nested in.
:type: nested_list_depth: int
"""
#: The name of this attribute, which is the full json path to it within the schema
self.name = name if prefix is None else prefix + "." + name
Expand Down Expand Up @@ -152,6 +154,8 @@ def _parse_response_model(schema, prefix=None, nested_list_depth=0):
become a new OpenAPIResponseAttr instance, and this process is
recursive to include the properties of properties and so on.
:type schema: openapi3.Schema
:param nested_list_depth: The number of nested lists this attribute is nested in.
:type: nested_list_depth: int
:returns: The list of parsed OpenAPIResponseAttr objects representing this schema
:rtype: List[OpenAPIResponseAttr]
"""
Expand Down
7 changes: 7 additions & 0 deletions linodecli/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ def print_response(
):
"""
Handles printing responses from Linode API requests.
:param response_model: The OpenAPI response to format this output with.
:type response_model: OpenAPIResponse
:param data: The API-returned data to output.
:type data: List[Union[str, dict]]
:param to: The IO stream to output to.
:type to: IO[str]
"""
attrs = copy.deepcopy(response_model.attrs)
tables = []
Expand Down

0 comments on commit 6a889e0

Please sign in to comment.