diff --git a/README.md b/README.md index 4320259c..c9441685 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Run example in Collab: str: """ Scrape the docstrings and parameters of a function decorated with `tool` and return a formatted string. @@ -13,7 +14,6 @@ def scrape_tool_func_docs(fn: Callable) -> str: str: A string containing the function's name, documentation string, and a list of its parameters. Each parameter is represented as a line containing the parameter's name, default value, and annotation. """ try: - # If the function is a tool, get the original function if hasattr(fn, "func"): fn = fn.func @@ -33,4 +33,13 @@ def scrape_tool_func_docs(fn: Callable) -> str: f" {inspect.getdoc(fn)}\nParameters:\n{parameters_str}" ) except Exception as error: - print(colored(f"Error scraping tool function docs {error} try optimizing your inputs with different variables and attempt once more.", "red")) \ No newline at end of file + print( + colored( + ( + f"Error scraping tool function docs {error} try" + " optimizing your inputs with different" + " variables and attempt once more." + ), + "red", + ) + )