-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ingest: initial beangulp Importer compat
- Loading branch information
Showing
11 changed files
with
301 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import datetime | ||
from abc import ABC | ||
from abc import abstractmethod | ||
from collections.abc import Sequence | ||
|
||
from fava.beans.abc import Account | ||
from fava.beans.abc import Directive | ||
|
||
class Importer(ABC): | ||
@property | ||
def name(self) -> str: ... | ||
@abstractmethod | ||
def identify(self, filepath: str) -> bool: ... | ||
@abstractmethod | ||
def account(self, filepath: str) -> Account: ... | ||
def date(self, filepath: str) -> datetime.date | None: ... | ||
def filename(self, filepath: str) -> str | None: ... | ||
def extract( | ||
self, filepath: str, existing: Sequence[Directive] | ||
) -> list[Directive]: ... | ||
def deduplicate( | ||
self, entries: list[Directive], existing: Sequence[Directive] | ||
) -> None: ... | ||
def sort( | ||
self, entries: list[Directive], reverse: bool = False | ||
) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from typing import Any | ||
|
||
_CACHE: dict[str, Any] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.