Remove -> None for Python functions

This commit is contained in:
krahets
2023-07-24 22:34:05 +08:00
parent ac0f405f9a
commit 90af225dae
31 changed files with 82 additions and 82 deletions

View File

@ -8,7 +8,7 @@ Author: Peng Chen (pengchzn@gmail.com)
class ArrayQueue:
"""基于环形数组实现的队列"""
def __init__(self, size: int) -> None:
def __init__(self, size: int):
"""构造方法"""
self.__nums: list[int] = [0] * size # 用于存储队列元素的数组
self.__front: int = 0 # 队首指针,指向队首元素
@ -26,7 +26,7 @@ class ArrayQueue:
"""判断队列是否为空"""
return self.__size == 0
def push(self, num: int) -> None:
def push(self, num: int):
"""入队"""
if self.__size == self.capacity():
raise IndexError("队列已满")