Trying to solve pre-commit error of type overload

This commit is contained in:
yashwanth-adimulam 2024-10-25 11:57:58 +05:30 committed by GitHub
parent f9ddbfb15b
commit 7427a23e94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,11 @@ class DynamicArray:
if index < 0 or index >= self.size:
raise IndexError("index out of range")
return self.array[index]
def __setitem__(self, index: int, value: int) -> None:
if index < 0 or index >= self.size:
raise IndexError("index out of range")
self.array[index] = value
def __len__(self) -> int:
"""