Skip to content

Commit

Permalink
Fix pylint E0606 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 5, 2025
1 parent b0f842b commit fe46574
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions taxcalc/calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3446,8 +3446,7 @@ def CTC_new(CTC_new_c, CTC_new_rt, CTC_new_c_under6_bonus,
ctc_new = min(ctc_new, ctc_new_reduced)
if ctc_new > 0. and CTC_new_refund_limited:
refund_new = max(0., ctc_new - c09200)
if not CTC_new_refund_limited_all_payroll:
limit_new = CTC_new_refund_limit_payroll_rt * ptax_oasdi
limit_new = CTC_new_refund_limit_payroll_rt * ptax_oasdi
if CTC_new_refund_limited_all_payroll:
limit_new = CTC_new_refund_limit_payroll_rt * payrolltax
limited_new = max(0., refund_new - limit_new)
Expand Down
5 changes: 2 additions & 3 deletions taxcalc/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,8 @@ def mtr_graph(self, calc,
assert mars == 'ALL' or 1 <= mars <= 4
# check validity of income_measure
assert income_measure in ('expanded_income', 'agi', 'wages')
if income_measure == 'expanded_income':
income_variable = 'expanded_income'
elif income_measure == 'agi':
income_variable = 'expanded_income'
if income_measure == 'agi':
income_variable = 'c00100'
elif income_measure == 'wages':
income_variable = 'e00200'
Expand Down
2 changes: 2 additions & 0 deletions taxcalc/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ def adjust(
print("WARNING:")
print(self.warnings)
kwargs["ignore_warnings"] = True
# pylint: disable=possibly-used-before-assignment
self._data = _data
# pylint: enable=possibly-used-before-assignment
_warnings = copy.deepcopy(self._warnings)
self._warnings = {}
self._errors = {}
Expand Down
1 change: 1 addition & 0 deletions taxcalc/tests/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def test_json_file_contents(tests_path, fname):
f'type={param["value_type"]}\n'
)
failures += msg
o = None
if fname == "consumption.json":
o = Consumption()
elif fname == "policy_current_law.json":
Expand Down

0 comments on commit fe46574

Please sign in to comment.