From cb94c4dbf64412f9c7a9112bb3ba5d558a5a32cc Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Tue, 17 Dec 2024 15:48:27 -0600 Subject: [PATCH] don't pass maxsplit as positional arg --- numpydoc/docscrape_sphinx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpydoc/docscrape_sphinx.py b/numpydoc/docscrape_sphinx.py index 9b1ccf78..3b2f325a 100644 --- a/numpydoc/docscrape_sphinx.py +++ b/numpydoc/docscrape_sphinx.py @@ -160,7 +160,7 @@ def _process_param(self, param, desc, fake_autosummary): display_param = f":obj:`{param} <{link_prefix}{param}>`" if obj_doc: # Overwrite desc. Take summary logic of autosummary - desc = re.split(r"\n\s*\n", obj_doc.strip(), 1)[0] + desc = re.split(r"\n\s*\n", obj_doc.strip(), maxsplit=1)[0] # XXX: Should this have DOTALL? # It does not in autosummary m = re.search(r"^([A-Z].*?\.)(?:\s|$)", " ".join(desc.split()))