Fix type annotations for stack.py (#5566)

This commit is contained in:
Edward Nuno
2021-10-26 11:33:08 -07:00
committed by GitHub
parent 582f57f41f
commit c0ed031b3f
4 changed files with 15 additions and 11 deletions

View File

@ -51,8 +51,8 @@ def dijkstras_two_stack_algorithm(equation: str) -> int:
"""
operators = {"*": op.mul, "/": op.truediv, "+": op.add, "-": op.sub}
operand_stack = Stack()
operator_stack = Stack()
operand_stack: Stack[int] = Stack()
operator_stack: Stack[str] = Stack()
for i in equation:
if i.isdigit():