fix(ci): Update pre-commit hooks and apply new black (#4359)

* fix(ci): Update pre-commit hooks and apply new black

* remove empty docstring
This commit is contained in:
Dhruv Manilawala
2021-04-26 11:16:50 +05:30
committed by GitHub
parent 69457357e8
commit 6f21f76696
13 changed files with 26 additions and 27 deletions

View File

@ -22,28 +22,28 @@ class Stack:
return str(self.stack)
def push(self, data):
""" Push an element to the top of the stack."""
"""Push an element to the top of the stack."""
if len(self.stack) >= self.limit:
raise StackOverflowError
self.stack.append(data)
def pop(self):
""" Pop an element off of the top of the stack."""
"""Pop an element off of the top of the stack."""
return self.stack.pop()
def peek(self):
""" Peek at the top-most element of the stack."""
"""Peek at the top-most element of the stack."""
return self.stack[-1]
def is_empty(self) -> bool:
""" Check if a stack is empty."""
"""Check if a stack is empty."""
return not bool(self.stack)
def is_full(self) -> bool:
return self.size() == self.limit
def size(self) -> int:
""" Return the size of the stack."""
"""Return the size of the stack."""
return len(self.stack)
def __contains__(self, item) -> bool: