Fix type annotations for stack.py (#5566)
This commit is contained in:
@@ -38,7 +38,7 @@ def infix_to_postfix(expression_str: str) -> str:
|
||||
"""
|
||||
if not balanced_parentheses(expression_str):
|
||||
raise ValueError("Mismatched parentheses")
|
||||
stack = Stack()
|
||||
stack: Stack[str] = Stack()
|
||||
postfix = []
|
||||
for char in expression_str:
|
||||
if char.isalpha() or char.isdigit():
|
||||
|
||||
Reference in New Issue
Block a user