-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
importer: Remove requirement for filename and lineno metadata
Importers have to add "filename" and "lineno" metadata entries to the generated entries. However, these are used only by the the bencount.core.data.entry_sortkey() sorting key function when entries are written in the ledger. As the Python sort implementation is guaranteed stable, this is at best not useful and actually problematic when the source document is sorted in reverse date order and the importer does not explicitly takes this in account. Implementing a sortkey() function that does not use these metadata entries removes the need for the importers to generate them and avoids the issue with reverse sorting of entries for the same day. Propagate the change to the base classes and example importers.
- Loading branch information
Showing
5 changed files
with
29 additions
and
22 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