From fb07a465b9463fbf63faa7ec2ef2de8bf7dd0a21 Mon Sep 17 00:00:00 2001 From: leehengpan Date: Wed, 25 Sep 2024 17:21:59 -0400 Subject: [PATCH 1/3] Apply five-year-forward check --- .../budget_2025/capital_gains_tax_increase.py | 12 ++++++++-- .../medicare_and_investment_tax_increase.py | 12 ++++++++-- ...se_taxable_earnings_for_social_security.py | 12 ++++++++-- .../boost/boost_middle_class_tax_credit.py | 12 ++++++++-- .../congress/tlaib/end_child_poverty_act.py | 12 ++++++++-- policyengine_us/reforms/dc_kccatc.py | 24 +++++++++++++++---- .../eitc/halve_joint_eitc_phase_out_rate.py | 12 ++++++++-- .../federal/abolish_federal_income_tax.py | 11 +++++++-- .../reforms/federal/abolish_payroll_tax.py | 11 +++++++-- .../federal/reported_state_income_tax.py | 9 ++++++- .../harris/lift/middle_class_tax_credit.py | 11 +++++++-- .../rent_relief_act/rent_relief_tax_credit.py | 11 +++++++-- ...ling_status_and_eligibility_by_children.py | 11 +++++++-- policyengine_us/reforms/states/dc/dc_ctc.py | 11 ++++++--- .../reforms/states/mn/walz/mn_walz_hf1938.py | 11 ++++++++- .../ny/wftc/ny_working_families_tax_credit.py | 12 ++++++++-- .../rebate/or_rebate_state_tax_exempt.py | 12 ++++++++-- 17 files changed, 171 insertions(+), 35 deletions(-) diff --git a/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py b/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py index 8ec22746075..21f22148807 100644 --- a/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py +++ b/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_capital_gains_tax_increase() -> Reform: class capital_gains_tax(Variable): @@ -145,8 +145,16 @@ def create_capital_gains_tax_increase_reform( return create_capital_gains_tax_increase() p = parameters(period).gov.contrib.biden.budget_2025.capital_gains + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).active: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.active: + if reform_active: return create_capital_gains_tax_increase() else: return None diff --git a/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py b/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py index ba3c848c77e..9d8353a417f 100644 --- a/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py +++ b/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_medicare_and_investment_tax_increase() -> Reform: class additional_medicare_tax(Variable): @@ -75,8 +75,16 @@ def create_medicare_and_investment_tax_increase_reform( return create_medicare_and_investment_tax_increase() p = parameters(period).gov.contrib.biden.budget_2025 + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).medicare.rate > 0 or p(current_period).net_investment_income.rate > 0: + reform_active = True + break + current_period = current_period.offset(1, "year") - if (p.medicare.rate > 0) | (p.net_investment_income.rate > 0): + if reform_active: return create_medicare_and_investment_tax_increase() else: return None diff --git a/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py b/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py index 1199cf18dbe..09319207f11 100644 --- a/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py +++ b/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_increase_taxable_earnings_for_social_security() -> Reform: class taxable_earnings_for_social_security(Variable): @@ -33,8 +33,16 @@ def create_increase_taxable_earnings_for_social_security_reform( return create_increase_taxable_earnings_for_social_security() p = parameters(period).gov.contrib.cbo.payroll + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).secondary_earnings_threshold < np.inf: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.secondary_earnings_threshold < np.inf: + if reform_active: return create_increase_taxable_earnings_for_social_security() else: return None diff --git a/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py b/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py index 57a2d87df04..1ba38c37573 100644 --- a/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py +++ b/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_boost_middle_class_tax_credit() -> Reform: class boost_middle_class_tax_credit(Variable): @@ -147,8 +147,16 @@ def create_boost_middle_class_tax_credit_reform( return create_boost_middle_class_tax_credit() p = parameters(period).gov.contrib.harris.lift.middle_class_tax_credit + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).in_effect: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.in_effect: + if reform_active: return create_boost_middle_class_tax_credit() else: return None diff --git a/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py b/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py index e85f226b509..a71d3646eee 100644 --- a/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py +++ b/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_end_child_poverty_act() -> Reform: class ecpa_adult_dependent_credit(Variable): @@ -180,8 +180,16 @@ def create_end_child_poverty_act_reform( return create_end_child_poverty_act() p = parameters(period).gov.contrib.congress.tlaib.end_child_poverty_act + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).in_effect: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.in_effect: + if reform_active: return create_end_child_poverty_act() else: return None diff --git a/policyengine_us/reforms/dc_kccatc.py b/policyengine_us/reforms/dc_kccatc.py index 0bf5ee9d66e..41f8ce8af0d 100644 --- a/policyengine_us/reforms/dc_kccatc.py +++ b/policyengine_us/reforms/dc_kccatc.py @@ -1,7 +1,7 @@ from policyengine_us.model_api import * +from policyengine_core.periods import period as period_ - -def create_dc_kccatc_reform(parameters, period, bypass=False): +def create_dc_kccatc(): class dc_kccatc(Variable): value_type = float entity = TaxUnit @@ -87,8 +87,24 @@ class reform(Reform): def apply(self): self.update_variable(dc_kccatc) - if bypass or parameters(period).gov.contrib.dc_kccatc.active: - return reform + return reform + + +def create_dc_kccatc_reform(parameters, period, bypass=False): + if bypass: + return create_dc_kccatc() + + p = parameters(period).gov.contrib.dc_kccatc + current_period = period_(period) + + for i in range(5): + if p(current_period).active: + reform_active = True + break + current_period = current_period.offset(1, "year") + + if reform_active: + return create_dc_kccatc() else: return None diff --git a/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py b/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py index ac94bae72dc..4c2520dff09 100644 --- a/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py +++ b/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_halve_joint_eitc_phase_out_rate() -> Reform: class eitc_phase_out_rate(Variable): @@ -32,8 +32,16 @@ def create_halve_joint_eitc_phase_out_rate_reform( return create_halve_joint_eitc_phase_out_rate() p = parameters(period).gov.contrib.joint_eitc + current_period = period_(period) + reform_active = False + + for i in range(5): + if p(current_period).in_effect: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.in_effect: + if reform_active: return create_halve_joint_eitc_phase_out_rate() else: return None diff --git a/policyengine_us/reforms/federal/abolish_federal_income_tax.py b/policyengine_us/reforms/federal/abolish_federal_income_tax.py index 71517463770..3a132134455 100644 --- a/policyengine_us/reforms/federal/abolish_federal_income_tax.py +++ b/policyengine_us/reforms/federal/abolish_federal_income_tax.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_abolish_federal_income_tax() -> Reform: class household_tax_before_refundable_credits(Variable): @@ -54,8 +54,15 @@ def create_abolish_federal_income_tax_reform( return create_abolish_federal_income_tax() p = parameters(period).gov.contrib.ubi_center.flat_tax + current_period = period_(period) + + for i in range(5): + if p(current_period).abolish_federal_income_tax: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.abolish_federal_income_tax: + if reform_active: return create_abolish_federal_income_tax() else: return None diff --git a/policyengine_us/reforms/federal/abolish_payroll_tax.py b/policyengine_us/reforms/federal/abolish_payroll_tax.py index d6192b47671..bbabef6360e 100644 --- a/policyengine_us/reforms/federal/abolish_payroll_tax.py +++ b/policyengine_us/reforms/federal/abolish_payroll_tax.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_abolish_payroll_tax() -> Reform: class household_tax_before_refundable_credits(Variable): @@ -34,8 +34,15 @@ def create_abolish_payroll_tax_reform( return create_abolish_payroll_tax() p = parameters(period).gov.contrib.ubi_center.flat_tax + current_period = period_(period) + + for i in range(5): + if p(current_period).abolish_payroll_tax: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.abolish_payroll_tax: + if reform_active: return create_abolish_payroll_tax() else: return None diff --git a/policyengine_us/reforms/federal/reported_state_income_tax.py b/policyengine_us/reforms/federal/reported_state_income_tax.py index 5f6b90294fc..fa328f22210 100644 --- a/policyengine_us/reforms/federal/reported_state_income_tax.py +++ b/policyengine_us/reforms/federal/reported_state_income_tax.py @@ -61,8 +61,15 @@ def create_reported_state_income_tax_reform( return create_reported_state_income_tax() p = parameters(period).simulation + current_period = period_(period) - if p.reported_state_income_tax: + for i in range(5): + if p(current_period).reported_state_income_tax: + reform_active = True + break + current_period = current_period.offset(1, "year") + + if reform_active: return create_reported_state_income_tax() else: return None diff --git a/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py b/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py index a438321d9ef..2d80425ef04 100644 --- a/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py +++ b/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_middle_class_tax_credit() -> Reform: class middle_class_tax_credit(Variable): @@ -61,8 +61,15 @@ def create_middle_class_tax_credit_reform( return create_middle_class_tax_credit() p = parameters(period).gov.contrib.harris.lift.middle_class_tax_credit + 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 p.in_effect: + if reform_active: return create_middle_class_tax_credit() else: return None diff --git a/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py b/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py index a3db48068a7..33315943092 100644 --- a/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py +++ b/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_rent_relief_tax_credit() -> Reform: class rent_relief_tax_credit(Variable): @@ -83,8 +83,15 @@ def create_rent_relief_tax_credit_reform( p = parameters( period ).gov.contrib.harris.rent_relief_act.rent_relief_credit + 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 p.in_effect: + if reform_active: return create_rent_relief_tax_credit() else: return None diff --git a/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py b/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py index 46cd0d13ae4..f735452fa69 100644 --- a/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py +++ b/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_adjust_income_limit_and_min_children_by_filing_status() -> Reform: class nyc_school_tax_credit_eligible(Variable): @@ -55,8 +55,15 @@ def create_adjust_income_limit_by_filing_status_and_eligibility_by_children_refo return create_adjust_income_limit_and_min_children_by_filing_status() p = parameters(period).gov.contrib.local.nyc.stc + current_period = period_(period) + + for i in range(5): + if p(current_period).adjust_income_limit_by_filing_status_and_eligibility_by_children: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.adjust_income_limit_by_filing_status_and_eligibility_by_children: + if reform_active: return create_adjust_income_limit_and_min_children_by_filing_status() else: return None diff --git a/policyengine_us/reforms/states/dc/dc_ctc.py b/policyengine_us/reforms/states/dc/dc_ctc.py index d49d37a2363..0ffe128057a 100644 --- a/policyengine_us/reforms/states/dc/dc_ctc.py +++ b/policyengine_us/reforms/states/dc/dc_ctc.py @@ -61,14 +61,19 @@ def create_dc_ctc_reform(parameters, period, bypass: bool = False): return create_dc_ctc() p = parameters.gov.contrib.states.dc.ctc - current_period = period_(period) + reform_active = False for i in range(5): if p(current_period).in_effect: - return create_dc_ctc() + reform_active = True + break current_period = current_period.offset(1, "year") - return None + + if reform_active: + return create_dc_ctc() + else: + return None dc_ctc = create_dc_ctc_reform(None, None, bypass=True) diff --git a/policyengine_us/reforms/states/mn/walz/mn_walz_hf1938.py b/policyengine_us/reforms/states/mn/walz/mn_walz_hf1938.py index 16f729546dd..c9fbaba0379 100644 --- a/policyengine_us/reforms/states/mn/walz/mn_walz_hf1938.py +++ b/policyengine_us/reforms/states/mn/walz/mn_walz_hf1938.py @@ -1,4 +1,5 @@ from policyengine_us.model_api import * +from policyengine_core.periods import period as period_ # Repealing Minnesota Bill HF1938 to pre 2023 rules @@ -212,8 +213,16 @@ def create_mn_walz_hf1938_repeal_reform( return create_mn_walz_hf1938_repeal() p = parameters(period).gov.contrib.states.mn.walz.hf1938 + reform_active = False + current_period = period_(period) - if p.repeal: + for i in range(5): + if p(current_period).repeal: + reform_active = True + break + current_period = current_period.offset(1, "year") + + if reform_active: return create_mn_walz_hf1938_repeal() else: return None diff --git a/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py b/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py index aa879a39906..d8dd643d412 100644 --- a/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py +++ b/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_ny_working_families_tax_credit() -> Reform: class ny_working_families_tax_credit(Variable): @@ -530,8 +530,16 @@ def create_ny_working_families_tax_credit_reform( return create_ny_working_families_tax_credit() p = parameters(period).gov.contrib.states.ny.wftc + 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 p.in_effect: + if reform_active: return create_ny_working_families_tax_credit() else: return None diff --git a/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py b/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py index 6752deaafb3..d30bd5a14bb 100644 --- a/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py +++ b/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py @@ -1,5 +1,5 @@ from policyengine_us.model_api import * - +from policyengine_core.periods import period as period_ def create_or_rebate_state_tax_exempt() -> Reform: class or_rebate_subtraction(Variable): @@ -49,8 +49,16 @@ def create_or_rebate_state_tax_exempt_reform( return create_or_rebate_state_tax_exempt() p = parameters(period).gov.contrib.states["or"].rebate + reform_active = False + current_period = period_(period) + + for i in range(5): + if p(current_period).state_tax_exempt: + reform_active = True + break + current_period = current_period.offset(1, "year") - if p.state_tax_exempt: + if reform_active: return create_or_rebate_state_tax_exempt() else: return None From 710d2ce2587f2a382a4f3ada8c55cceb8f54f3c6 Mon Sep 17 00:00:00 2001 From: leehengpan Date: Mon, 30 Sep 2024 10:59:24 -0400 Subject: [PATCH 2/3] changelog_entry.yaml added --- changelog_entry.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..08481968cd9 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Add five-year-forward check on all reforms From b00f92518d07e9064596c855f6609cbb50bf295e Mon Sep 17 00:00:00 2001 From: leehengpan Date: Mon, 30 Sep 2024 11:00:03 -0400 Subject: [PATCH 3/3] Fixed formatting --- .../reforms/biden/budget_2025/capital_gains_tax_increase.py | 1 + .../budget_2025/medicare_and_investment_tax_increase.py | 6 +++++- .../increase_taxable_earnings_for_social_security.py | 1 + .../congress/tlaib/boost/boost_middle_class_tax_credit.py | 1 + .../reforms/congress/tlaib/end_child_poverty_act.py | 1 + policyengine_us/reforms/dc_kccatc.py | 3 ++- .../reforms/eitc/halve_joint_eitc_phase_out_rate.py | 1 + .../reforms/federal/abolish_federal_income_tax.py | 1 + policyengine_us/reforms/federal/abolish_payroll_tax.py | 1 + .../reforms/harris/lift/middle_class_tax_credit.py | 1 + .../harris/rent_relief_act/rent_relief_tax_credit.py | 1 + ...me_limit_by_filing_status_and_eligibility_by_children.py | 5 ++++- .../states/ny/wftc/ny_working_families_tax_credit.py | 1 + .../states/oregon/rebate/or_rebate_state_tax_exempt.py | 1 + 14 files changed, 22 insertions(+), 3 deletions(-) diff --git a/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py b/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py index 21f22148807..b8ab179e1e6 100644 --- a/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py +++ b/policyengine_us/reforms/biden/budget_2025/capital_gains_tax_increase.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_capital_gains_tax_increase() -> Reform: class capital_gains_tax(Variable): value_type = float diff --git a/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py b/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py index 9d8353a417f..3575686bb79 100644 --- a/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py +++ b/policyengine_us/reforms/biden/budget_2025/medicare_and_investment_tax_increase.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_medicare_and_investment_tax_increase() -> Reform: class additional_medicare_tax(Variable): value_type = float @@ -79,7 +80,10 @@ def create_medicare_and_investment_tax_increase_reform( reform_active = False for i in range(5): - if p(current_period).medicare.rate > 0 or p(current_period).net_investment_income.rate > 0: + if ( + p(current_period).medicare.rate > 0 + or p(current_period).net_investment_income.rate > 0 + ): reform_active = True break current_period = current_period.offset(1, "year") diff --git a/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py b/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py index 09319207f11..817f680e89c 100644 --- a/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py +++ b/policyengine_us/reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_increase_taxable_earnings_for_social_security() -> Reform: class taxable_earnings_for_social_security(Variable): value_type = float diff --git a/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py b/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py index 1ba38c37573..b1342e1dd62 100644 --- a/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py +++ b/policyengine_us/reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_boost_middle_class_tax_credit() -> Reform: class boost_middle_class_tax_credit(Variable): value_type = float diff --git a/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py b/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py index a71d3646eee..5c5382fd679 100644 --- a/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py +++ b/policyengine_us/reforms/congress/tlaib/end_child_poverty_act.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_end_child_poverty_act() -> Reform: class ecpa_adult_dependent_credit(Variable): value_type = float diff --git a/policyengine_us/reforms/dc_kccatc.py b/policyengine_us/reforms/dc_kccatc.py index 41f8ce8af0d..e778dff480a 100644 --- a/policyengine_us/reforms/dc_kccatc.py +++ b/policyengine_us/reforms/dc_kccatc.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_dc_kccatc(): class dc_kccatc(Variable): value_type = float @@ -93,7 +94,7 @@ def apply(self): def create_dc_kccatc_reform(parameters, period, bypass=False): if bypass: return create_dc_kccatc() - + p = parameters(period).gov.contrib.dc_kccatc current_period = period_(period) diff --git a/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py b/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py index 4c2520dff09..715bf4e0582 100644 --- a/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py +++ b/policyengine_us/reforms/eitc/halve_joint_eitc_phase_out_rate.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_halve_joint_eitc_phase_out_rate() -> Reform: class eitc_phase_out_rate(Variable): value_type = float diff --git a/policyengine_us/reforms/federal/abolish_federal_income_tax.py b/policyengine_us/reforms/federal/abolish_federal_income_tax.py index 3a132134455..72a1d78114a 100644 --- a/policyengine_us/reforms/federal/abolish_federal_income_tax.py +++ b/policyengine_us/reforms/federal/abolish_federal_income_tax.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_abolish_federal_income_tax() -> Reform: class household_tax_before_refundable_credits(Variable): value_type = float diff --git a/policyengine_us/reforms/federal/abolish_payroll_tax.py b/policyengine_us/reforms/federal/abolish_payroll_tax.py index bbabef6360e..3dd2b550430 100644 --- a/policyengine_us/reforms/federal/abolish_payroll_tax.py +++ b/policyengine_us/reforms/federal/abolish_payroll_tax.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_abolish_payroll_tax() -> Reform: class household_tax_before_refundable_credits(Variable): value_type = float diff --git a/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py b/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py index 2d80425ef04..3b930010d2c 100644 --- a/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py +++ b/policyengine_us/reforms/harris/lift/middle_class_tax_credit.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_middle_class_tax_credit() -> Reform: class middle_class_tax_credit(Variable): value_type = float diff --git a/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py b/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py index 33315943092..3d7fdf19193 100644 --- a/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py +++ b/policyengine_us/reforms/harris/rent_relief_act/rent_relief_tax_credit.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_rent_relief_tax_credit() -> Reform: class rent_relief_tax_credit(Variable): value_type = float diff --git a/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py b/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py index f735452fa69..35b4c61c82a 100644 --- a/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py +++ b/policyengine_us/reforms/local/nyc/stc/adjust_income_limit_by_filing_status_and_eligibility_by_children.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_adjust_income_limit_and_min_children_by_filing_status() -> Reform: class nyc_school_tax_credit_eligible(Variable): value_type = bool @@ -58,7 +59,9 @@ def create_adjust_income_limit_by_filing_status_and_eligibility_by_children_refo current_period = period_(period) for i in range(5): - if p(current_period).adjust_income_limit_by_filing_status_and_eligibility_by_children: + if p( + current_period + ).adjust_income_limit_by_filing_status_and_eligibility_by_children: reform_active = True break current_period = current_period.offset(1, "year") diff --git a/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py b/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py index d8dd643d412..481e99b93b5 100644 --- a/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py +++ b/policyengine_us/reforms/states/ny/wftc/ny_working_families_tax_credit.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_ny_working_families_tax_credit() -> Reform: class ny_working_families_tax_credit(Variable): value_type = float diff --git a/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py b/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py index d30bd5a14bb..2c14894af94 100644 --- a/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py +++ b/policyengine_us/reforms/states/oregon/rebate/or_rebate_state_tax_exempt.py @@ -1,6 +1,7 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ + def create_or_rebate_state_tax_exempt() -> Reform: class or_rebate_subtraction(Variable): value_type = float