Refactor NetInvIncTax function in calcfunctions.py module#3047
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3047 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 2721 2721
=========================================
Hits 2721 2721
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sectional banner comments mirror Form 8960 (2025) Parts I and III;
Part II (investment expenses, lines 9-11) is flagged in a one-line
comment as unmodeled (effectively zero). The body is rewritten in
form-line locals (line1, line2, line4c, line5d, line8, line12, line15,
line16) preserving the original arithmetic exactly. The outer max(0.,
NII) is retained as Form 8960 line 12's "If zero or less, enter -0-"
semantics. The inline comment documenting the line 13 MAGI proxy (Form
2555 not modeled) is preserved.
The docstring is rewritten to cite Form 8960 (2025), map each input to
its form line (e00300 line 1, e00600 line 2, e02000 line 4a, -e26270
line 4b, c01000 line 5a, c00100 line 13 MAGI proxy, NIIT_thd[MARS-1]
line 14, NIIT_rt line 17), flag unmodeled items (line 3 annuities,
lines 5b/5c, lines 6/7, all of Part II), document NIIT_PT_taxed as the
line-4b reform knob, and trace niit downstream through C1040 to
Schedule 2 line 12. The e00300 parameter description is corrected from
"Tax-exempt interest income" to "Taxable interest income" to match
records_variables.json (the field was already correctly used in the
formula).
Function signature, parameter ordering, and return tuple unchanged;
no policy parameters or records variables touched.