mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix B034 (use keyword arguments for calls to `re.split()
`)
This commit is contained in:
parent
60f37b8b90
commit
6cd8723f5d
@ -144,7 +144,7 @@ class ReSTDirectiveOption(ReSTMarkup):
|
|||||||
|
|
||||||
def handle_signature(self, sig: str, signode: desc_signature) -> str:
|
def handle_signature(self, sig: str, signode: desc_signature) -> str:
|
||||||
try:
|
try:
|
||||||
name, argument = re.split(r'\s*:\s+', sig.strip(), 1)
|
name, argument = re.split(r'\s*:\s+', sig.strip(), maxsplit=1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
name, argument = sig, None
|
name, argument = sig, None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user