Skip to content

Commit

Permalink
Fix pylint W0237 and W0401 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 5, 2025
1 parent 9a58081 commit 7141d17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 5 additions & 5 deletions taxcalc/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,18 +505,18 @@ def adjust_with_indexing(self, params_or_path, **kwargs):
)
return adj

def get_index_rate(self, param, label_to_extend_val):
def get_index_rate(self, param, lte_val):
"""
Initalize indexing data and return the indexing rate value
depending on the parameter name and label_to_extend_val, the value of
label_to_extend.
depending on the parameter name and lte_val (that is, the
label_to_extend_val), the value of label_to_extend.
Returns: rate to use for indexing.
"""
if not self._inflation_rates or not self._wage_growth_rates:
self.set_rates()
if param in self._wage_indexed:
return self.wage_growth_rates(year=label_to_extend_val)
return self.inflation_rates(year=label_to_extend_val)
return self.wage_growth_rates(year=lte_val)
return self.inflation_rates(year=lte_val)

def set_rates(self):
"""
Expand Down
8 changes: 7 additions & 1 deletion taxcalc/tests/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
from pandas.testing import assert_frame_equal
import pytest
import taxcalc
from taxcalc.decorators import *
from taxcalc.decorators import (
iterate_jit,
apply_jit,
create_apply_function_string,
create_toplevel_function_string,
make_apply_function,
)


def test_create_apply_function_string():
Expand Down

0 comments on commit 7141d17

Please sign in to comment.