Loading muffin/payment_order/PaymentOrderCollection.py +11 −1 Original line number Diff line number Diff line from dataclasses import dataclass from pathlib import Path from typing import Self from collections.abc import Iterable, Iterator from pathlib import Path from ..integration.schwalbe.studienfachschaften import Studienfachschaft from ..utils import group_by from .PaymentOrder import PaymentOrder Loading @@ -13,6 +15,14 @@ class PaymentOrderCollection(Iterable[PaymentOrder]): base_dir: Path @classmethod def get(cls, studienfachschaft: Studienfachschaft, year: int) -> Self: pass # TODO @classmethod def from_dir(cls, path_or_str: Path | str) -> Self: pass # TODO def __iter__(self) -> Iterator[PaymentOrder]: return (load_pdf(pdf) for pdf in self.base_dir.rglob("*.pdf")) Loading Loading
muffin/payment_order/PaymentOrderCollection.py +11 −1 Original line number Diff line number Diff line from dataclasses import dataclass from pathlib import Path from typing import Self from collections.abc import Iterable, Iterator from pathlib import Path from ..integration.schwalbe.studienfachschaften import Studienfachschaft from ..utils import group_by from .PaymentOrder import PaymentOrder Loading @@ -13,6 +15,14 @@ class PaymentOrderCollection(Iterable[PaymentOrder]): base_dir: Path @classmethod def get(cls, studienfachschaft: Studienfachschaft, year: int) -> Self: pass # TODO @classmethod def from_dir(cls, path_or_str: Path | str) -> Self: pass # TODO def __iter__(self) -> Iterator[PaymentOrder]: return (load_pdf(pdf) for pdf in self.base_dir.rglob("*.pdf")) Loading