From 4bc35383ae923d09fc35ce3e902219f119042daa Mon Sep 17 00:00:00 2001 From: GeoffreyCoulaud Date: Sat, 20 May 2023 19:57:40 +0200 Subject: [PATCH] Changed source.__next__() type hint --- src/importer/source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/importer/source.py b/src/importer/source.py index 663b92e..25da61c 100644 --- a/src/importer/source.py +++ b/src/importer/source.py @@ -1,5 +1,6 @@ from abc import abstractmethod from collections.abc import Iterable, Iterator, Sized +from typing import Optional from src.game import Game from src.window import CartridgesWindow @@ -22,7 +23,7 @@ class SourceIterator(Iterator, Sized): """Get a rough estimate of the number of games produced by the source""" @abstractmethod - def __next__(self) -> "Game" | None: + def __next__(self) -> Optional[Game]: """Get the next generated game from the source. Raises StopIteration when exhausted. May raise any other exception signifying an error on this specific game.