2 Commits

Author SHA1 Message Date
Mikaël Capelle
c69694da7e Force string type for answer value.
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-08 14:34:04 +01:00
Mikaël Capelle
d7c5b1b658 Apply formatting.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-12-08 14:05:14 +01:00
2 changed files with 4 additions and 7 deletions

View File

@@ -193,7 +193,7 @@ def main():
"answer", "answer",
{ {
"answer": i_answer + 1, "answer": i_answer + 1,
"value": answer, "value": str(answer),
"answerTime_s": (current - last).total_seconds(), "answerTime_s": (current - last).total_seconds(),
"totalTime_s": (current - start).total_seconds(), "totalTime_s": (current - start).total_seconds(),
}, },

View File

@@ -7,12 +7,10 @@ _T = TypeVar("_T")
class ProgressHandler(Protocol): class ProgressHandler(Protocol):
@overload @overload
def wrap(self, values: Sequence[_T]) -> Iterator[_T]: def wrap(self, values: Sequence[_T]) -> Iterator[_T]: ...
...
@overload @overload
def wrap(self, values: Iterable[_T], total: int) -> Iterator[_T]: def wrap(self, values: Iterable[_T], total: int) -> Iterator[_T]: ...
...
class BaseSolver: class BaseSolver:
@@ -33,5 +31,4 @@ class BaseSolver:
self.outputs = outputs self.outputs = outputs
@abstractmethod @abstractmethod
def solve(self, input: str) -> Iterator[Any] | None: def solve(self, input: str) -> Iterator[Any] | None: ...
...