PolicyEngine / PolicyEngine/policyengine-us
Simplify the `ny_supplemental_tax` variable formula
Open
code-health
- Dominant language
- Python
- Stars
- 163
- Forks
- 213
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 96
Description
We should break up the formula into multiple variables and use a select for the rate calculation:
```
rates = tax.main
single = rates.single
joint = rates.joint
hoh = rates.head_of_household
widow = rates.widow
separate = rates.separate
scales = [single, joint, hoh, widow, separate]
previous_agi_threshold = select(
in_each_status,
[
get_previous_threshold(ny_taxable_income, scale.thresholds)
for scale in scales
],
)
```
Contributor guide
Assessment
This issue has not been assessed yet.