From 6cd8723f5da3f93638e24eb8b5bac23c4787b955 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:36:25 +0100 Subject: [PATCH] Fix B034 (use keyword arguments for calls to ``re.split()``) --- sphinx/domains/rst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/domains/rst.py b/sphinx/domains/rst.py index 9029673d3..1269cac9b 100644 --- a/sphinx/domains/rst.py +++ b/sphinx/domains/rst.py @@ -144,7 +144,7 @@ class ReSTDirectiveOption(ReSTMarkup): def handle_signature(self, sig: str, signode: desc_signature) -> str: try: - name, argument = re.split(r'\s*:\s+', sig.strip(), 1) + name, argument = re.split(r'\s*:\s+', sig.strip(), maxsplit=1) except ValueError: name, argument = sig, None