Skip to content

Commit 741bf17

Browse files
Improve docstring retreival.
1 parent ba6c41e commit 741bf17

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tabpy/tabpy_tools/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ def _gen_endpoint(self, name, obj, description, version=1, schema=None, is_publi
397397
description = obj.__doc__.strip() or "" if isinstance(obj.__doc__, str) else ""
398398

399399
endpoint_object = CustomQueryObject(query=obj, description=description,)
400-
docstring = inspect.getdoc(obj) or "-- no docstring found in query function --"
401400

402401
return {
403402
"name": name,
@@ -409,7 +408,7 @@ def _gen_endpoint(self, name, obj, description, version=1, schema=None, is_publi
409408
"methods": endpoint_object.get_methods(),
410409
"required_files": [],
411410
"required_packages": [],
412-
"docstring": docstring,
411+
"docstring": endpoint_object.get_doc_string(),
413412
"schema": copy.copy(schema),
414413
"is_public": is_public,
415414
}

0 commit comments

Comments
 (0)