Skip to content

Commit 424345e

Browse files
committed
Improve parenthesis checks
1 parent c079356 commit 424345e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/inspection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ def parsekeywordpairs(signature: str) -> Dict[str, str]:
138138
continue
139139

140140
if token is Token.Punctuation:
141-
if value in ("(", "{", "["):
141+
if value in "({[":
142142
parendepth += 1
143-
elif value in (")", "}", "]"):
143+
elif value in ")}]":
144144
parendepth -= 1
145145
elif value == ":" and parendepth == -1:
146146
# End of signature reached

0 commit comments

Comments
 (0)