Skip to content

Commit

Permalink
Merge pull request #5487 from PolicyEngine/dc_ptc_fix
Browse files Browse the repository at this point in the history
Apply 5 year forward check to the DC PTC reform
  • Loading branch information
PavelMakarchuk authored Jan 17, 2025
2 parents 7570d89 + 3a74b72 commit 9030fc7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- DC property tax credit reform 5 year forward check.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from policyengine_us.model_api import *
from policyengine_core.periods import period as period_


def create_dc_property_tax_credit() -> Reform:
Expand Down Expand Up @@ -101,9 +102,18 @@ def create_dc_property_tax_credit_reform(
if bypass:
return create_dc_property_tax_credit()

p = parameters(period).gov.contrib.states.dc.property_tax
p = parameters.gov.contrib.states.dc.property_tax

if p.in_effect:
reform_active = False
current_period = period_(period)

for i in range(5):
if p(current_period).in_effect:
reform_active = True
break
current_period = current_period.offset(1, "year")

if reform_active:
return create_dc_property_tax_credit()
else:
return None
Expand Down

0 comments on commit 9030fc7

Please # to comment.