Skip to content

Commit

Permalink
Correct doc_string to docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Nov 22, 2024
1 parent 779dd5a commit 2eae970
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tabpy/tabpy_server/management/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def add_endpoint(
Name of the endpoint
description : str, optional
Description of this endpoint
doc_string : str, optional
docstring : str, optional
The doc string for this endpoint, if needed.
endpoint_type : str
The endpoint type (model, alias)
Expand Down Expand Up @@ -309,7 +309,7 @@ def update_endpoint(
Name of the endpoint
description : str, optional
Description of this endpoint
doc_string : str, optional
docstring : str, optional
The doc string for this endpoint, if needed.
endpoint_type : str, optional
The endpoint type (model, alias)
Expand Down
2 changes: 1 addition & 1 deletion tabpy/tabpy_tools/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def _gen_endpoint(self, name, obj, description, version=1, schema=None, is_publi
"methods": endpoint_object.get_methods(),
"required_files": [],
"required_packages": [],
"docstring": endpoint_object.get_doc_string(),
"docstring": endpoint_object.get_docstring(),
"schema": copy.copy(schema),
"is_public": is_public,
}
Expand Down
2 changes: 1 addition & 1 deletion tabpy/tabpy_tools/custom_query_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def query(self, *args, **kwargs):
)
raise

def get_doc_string(self):
def get_docstring(self):
"""Get doc string from customized query"""
default_docstring = "-- no docstring found in query function --"

Expand Down
4 changes: 2 additions & 2 deletions tabpy/tabpy_tools/query_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class QueryObject(abc.ABC):
"""
Derived class needs to implement the following interface:
* query() -- given input, return query result
* get_doc_string() -- returns documentation for the Query Object
* get_docstring() -- returns documentation for the Query Object
"""

def __init__(self, description=""):
Expand All @@ -30,7 +30,7 @@ def query(self, input):
pass

@abc.abstractmethod
def get_doc_string(self):
def get_docstring(self):
"""Returns documentation for the query object
By default, this method returns the docstring for 'query' method
Expand Down

0 comments on commit 2eae970

Please sign in to comment.