Skip to content

Commit

Permalink
siegfried:SiegfriedResult.files_dict - add property to get files as a…
Browse files Browse the repository at this point in the history
… dict
  • Loading branch information
MatteoCampinoti94 committed Jun 19, 2024
1 parent a278381 commit 4f644fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions acacore/siegfried/siegfried.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ class SiegfriedResult(BaseModel):
files: list[SiegfriedFile]
model_config = ConfigDict(extra="forbid")

@property
def files_dict(self) -> dict[Path, SiegfriedFile]:
return {f.filename: f for f in self.files}


class Siegfried:
"""
Expand Down

0 comments on commit 4f644fa

Please sign in to comment.