Changeset - 1ca7cccf1702
[Not reviewed]
0 1 0
Brett Smith - 3 years ago 2021-02-26 22:23:00
brettcsmith@brettcsmith.org
txn_date: Refine the filename regexp.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/txn_date.py
Show inline comments
...
 
@@ -25,7 +25,8 @@ class TransactionDate(core.TransactionHook):
 
                "books dir setting is required to check transaction dates",
 
            )
 
        books_pat = re.escape(str(books_path))
 
        self.filename_re = re.compile(rf'^{books_pat}/(\d{{4,}})[{os.path.sep}_.]')
 
        path_sep = re.escape(os.path.sep)
 
        self.filename_re = re.compile(rf'^{books_pat}{path_sep}(\d{{4,}})[\W_]')
 
        self.fy = config.fiscal_year_begin()
 

	
 
    def run(self, txn: Transaction) -> errormod.Iter:
0 comments (0 inline, 0 general)