Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
muffin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Moser
muffin
Commits
461f4508
Commit
461f4508
authored
5 months ago
by
Jakob Moser
Browse files
Options
Downloads
Patches
Plain Diff
Implement from_dir
parent
c73598fa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#6636
passed
5 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
muffin/payment_order/PaymentOrderCollection.py
+7
-3
7 additions, 3 deletions
muffin/payment_order/PaymentOrderCollection.py
with
7 additions
and
3 deletions
muffin/payment_order/PaymentOrderCollection.py
+
7
−
3
View file @
461f4508
...
...
@@ -13,7 +13,7 @@ from .loader import load_pdf
@dataclass
(
frozen
=
True
,
eq
=
False
)
class
PaymentOrderCollection
(
Iterable
[
PaymentOrder
]):
base_dir
:
Path
orders
:
tuple
[
PaymentOrder
,
...]
@classmethod
def
get
(
cls
,
studienfachschaft
:
Studienfachschaft
,
year
:
int
)
->
Self
:
...
...
@@ -21,10 +21,14 @@ class PaymentOrderCollection(Iterable[PaymentOrder]):
@classmethod
def
from_dir
(
cls
,
path_or_str
:
Path
|
str
)
->
Self
:
pass
# TODO
return
cls
(
tuple
(
load_pdf
(
pdf
)
for
pdf
in
Path
(
path_or_str
).
rglob
(
"
*.pdf
"
)
)
)
def
__iter__
(
self
)
->
Iterator
[
PaymentOrder
]:
return
(
load_pdf
(
pdf
)
for
pdf
in
self
.
base_dir
.
rglob
(
"
*.pdf
"
)
)
return
iter
(
self
.
orders
)
@property
def
by_budgetary_item_id
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment