From c644f52839fe320bf4c8c21661ae8534fd60b37d Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 24 Sep 2024 07:17:41 +0200 Subject: Refactor Card out of parser.py, implement brutal scheduler constructor --- src/parser.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/parser.py') diff --git a/src/parser.py b/src/parser.py index 4836bdf..d2b4ce7 100644 --- a/src/parser.py +++ b/src/parser.py @@ -24,15 +24,13 @@ FRONT The cards are represented in dictionary entries of the form: -id: (front_text, back_text) +id: card.Card """ from pathlib import Path -from collections import namedtuple from enum import Enum from typing import TextIO, Iterator - -Card = namedtuple('Card', ['front', 'back']) +from card import Card def _getCard(front_lines: list[str], back_lines: list[str]) -> tuple[int, Card]: front_text = "".join(front_lines).strip() -- cgit v1.2.3