txn_date: Refine the filename regexp.
This commit is contained in:
parent
9598b29ba7
commit
1ca7cccf17
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue