diff options
author | Eddy Pedroni <epedroni@pm.me> | 2024-09-24 07:17:41 +0200 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2024-09-24 07:19:55 +0200 |
commit | c644f52839fe320bf4c8c21661ae8534fd60b37d (patch) | |
tree | 870e74fda36bba298b62eba5e4c145506496fe06 /src/parser.py | |
parent | 22bfa00d56233ddb93394b23313efb7c2fcebbc8 (diff) |
Refactor Card out of parser.py, implement brutal scheduler constructor
Diffstat (limited to 'src/parser.py')
-rw-r--r-- | src/parser.py | 6 |
1 files changed, 2 insertions, 4 deletions
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() |