Changeset - 9a0ff8da96e7
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 14 months ago 2023-05-02 04:32:53
ben@sturm.com.au
Remove unused import
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/meta_payroll_type.py
Show inline comments
 
"""meta_payroll_type - Validate payroll-type metadata"""
 
# Copyright © 2020  Bradley M. Kuhn, Brett Smith
 
# License: AGPLv3-or-later WITH Beancount-Plugin-Additional-Permission-1.0
 
#
 
# Full copyright and licensing details can be found at toplevel file
 
# LICENSE.txt in the repository.
 

	
 
import datetime
 

	
 
from . import core
 
from .. import ranges
 
from .. import data
 
from .. import errors as errormod
 

	
 
from ..beancount_types import (
 
    Transaction,
 
)
 

	
 
METADATA_KEY = 'payroll-type'
 

	
 

	
 
class _PayrollTypeHook(core._NormalizePostingMetadataHook):
 
    ACCOUNT: str
 
    VALUES_ENUM = core.MetadataEnum(METADATA_KEY, [])
 
    TXN_DATE_RANGE = ranges.DateRange(
 
        datetime.date(2020, 3, 1),
 
        core.DEFAULT_STOP_DATE,
 
    )
 

	
 
    def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
 
        return post.account.is_under(self.ACCOUNT) is not None
 

	
 

	
0 comments (0 inline, 0 general)