Skip to content

Commit 1e0d57c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a0f8b6f commit 1e0d57c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

data_structures/stacks/balanced_parentheses.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ def balanced_parentheses(parentheses: str) -> bool:
1919
for bracket in parentheses:
2020
if bracket in bracket_pairs:
2121
stack.push(bracket)
22-
elif bracket in (")", "]", "}") and (stack.is_empty() or bracket_pairs[stack.pop()] != bracket):
22+
elif bracket in (")", "]", "}") and (
23+
stack.is_empty() or bracket_pairs[stack.pop()] != bracket
24+
):
2325
return False
2426
return stack.is_empty()
2527

0 commit comments

Comments
 (0)