Skip to content

Commit

Permalink
chore: Format
Browse files Browse the repository at this point in the history
  • Loading branch information
anth-volk committed Oct 29, 2024
1 parent 877c423 commit be0f5bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- bump: patch
changes:
changed:
- Altered handling of federal params in VA reduced itemized deductions
- Altered handling of federal params in VA reduced itemized deductions
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ def formula(tax_unit, period, parameters):
# remove anything TCJA related, but keep everything else coupled to the IRS

# Shortcut to the full parameter, not parameter at instant, for IRS itemized limitations
full_irs_param: Parameter = parameters.gov.irs.deductions.itemized.limitation
full_irs_param: Parameter = (
parameters.gov.irs.deductions.itemized.limitation
)

va_itemized_deduction_rate = full_irs_param.itemized_deduction_rate.clone()
va_itemized_deduction_rate = (
full_irs_param.itemized_deduction_rate.clone()
)

# Eliminate infinite values created by the TCJA's elimination of this param
va_itemized_deduction_rate.values_list = [
entry for entry in va_itemized_deduction_rate.values_list
entry
for entry in va_itemized_deduction_rate.values_list
if not (entry.value == np.inf or entry.value == -np.inf)
]

Expand All @@ -65,7 +70,8 @@ def formula(tax_unit, period, parameters):
# and we'll need to eliminate infinite values created by TCJA abolishing param
va_agi_rate = full_irs_param.agi_rate.clone()
va_agi_rate.values_list = [
entry for entry in va_agi_rate.values_list
entry
for entry in va_agi_rate.values_list
if not (entry.value == np.inf or entry.value == -np.inf)
]

Expand All @@ -90,7 +96,9 @@ def formula(tax_unit, period, parameters):
"va_capped_state_and_local_sales_or_income_tax", period
)

state_and_local_tax_adj = capped_state_and_local_tax * adjustment_fraction
state_and_local_tax_adj = (
capped_state_and_local_tax * adjustment_fraction
)
# Line 15 - Subtract Line 14 from Line 13
reduced_state_and_local_tax = max_(
capped_state_and_local_tax - state_and_local_tax_adj, 0
Expand Down

0 comments on commit be0f5bd

Please sign in to comment.