Skip to content

Commit 6fbe51d

Browse files
perf: import parse_doc only if needed
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent cb9563e commit 6fbe51d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wdoc/wdoc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,5 +1521,9 @@ def create_autoincrease_top_k_chain(inputs):
15211521
logger.warning(f"Total cost: ${etotal_cost:.5f}")
15221522
self.latest_cost = etotal_cost
15231523

1524+
@set_parse_doc_help_md_as_docstring
1525+
@staticmethod
1526+
def parse_doc(*args, **kwargs) -> Union[List[Document], str, List[dict]]:
1527+
from wdoc.utils.tasks.parse import parse_doc
15241528

1525-
wdoc.parse_doc = staticmethod(parse_doc)
1529+
return parse_doc(*args, **kwargs)

0 commit comments

Comments
 (0)