🎨 SourceIterator is not sized anymore

This commit is contained in:
GeoffreyCoulaud
2023-05-31 18:18:58 +02:00
parent ef63210a8f
commit a213abe4da
3 changed files with 2 additions and 26 deletions

View File

@@ -1,11 +1,11 @@
from abc import abstractmethod
from collections.abc import Iterable, Iterator, Sized
from collections.abc import Iterable, Iterator
from typing import Optional
from src.game import Game
class SourceIterator(Iterator, Sized):
class SourceIterator(Iterator):
"""Data producer for a source of games"""
source: "Source" = None
@@ -17,10 +17,6 @@ class SourceIterator(Iterator, Sized):
def __iter__(self) -> "SourceIterator":
return self
@abstractmethod
def __len__(self) -> int:
"""Get a rough estimate of the number of games produced by the source"""
@abstractmethod
def __next__(self) -> Optional[Game]:
"""Get the next generated game from the source.