Skip to content

Commit

Permalink
Fix pylint C0103 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 4, 2025
1 parent 9fb604c commit dfb578c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
3 changes: 3 additions & 0 deletions taxcalc/tests/test_calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def test_function_args_usage(tests_path):
raise ValueError(msg)


# pylint: disable=invalid-name


def test_DependentCare(skip_jit):
"""
Tests the DependentCare function
Expand Down
16 changes: 8 additions & 8 deletions taxcalc/tests/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,28 +559,28 @@ def test_expand_2d_partial_expand():
assert np.allclose(res, exp, atol=0.01, rtol=0.0)


taxcalc_revision = """
TAXCALC_REVISION = """
{
"consumption": {"BEN_mcaid_value": {"2013": 0.9}}
}
"""

paramtools_revision = """
PARAMTOOLS_REVISION = """
{
"consumption": {"BEN_mcaid_value": [{"year": "2013", "value": 0.9}]}
}
"""

paramtools_revision2 = """
PARAMTOOLS_REVISION2 = """
{
"consumption": {"BEN_mcaid_value": 0.9}
}
"""


@pytest.mark.parametrize("good_revision", [
taxcalc_revision,
paramtools_revision,
TAXCALC_REVISION,
PARAMTOOLS_REVISION,
])
def test_read_json_revision(good_revision):
"""
Expand All @@ -599,9 +599,9 @@ def test_read_json_revision(good_revision):


@pytest.mark.parametrize("params,is_paramtools", [
(taxcalc_revision, False),
(paramtools_revision, True),
(paramtools_revision2, True),
(TAXCALC_REVISION, False),
(PARAMTOOLS_REVISION, True),
(PARAMTOOLS_REVISION2, True),
])
def test_read_json_revision_foramts(params, is_paramtools):
"""
Expand Down
3 changes: 3 additions & 0 deletions taxcalc/tests/test_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,9 @@ def test_multiple_cpi_swaps2():
)


# pylint: disable=invalid-name


def test_adj_CPI_offset_and_index_status():
"""
Test changing parameter_indexing_CPI_offset and another
Expand Down
4 changes: 2 additions & 2 deletions taxcalc/tests/test_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from taxcalc import GrowFactors, Policy, Records, Calculator


def test_incorrect_Records_instantiation(cps_subsample):
def test_incorrect_records_instantiation(cps_subsample):
with pytest.raises(ValueError):
recs = Records(data=[])
with pytest.raises(ValueError):
Expand All @@ -26,7 +26,7 @@ def test_incorrect_Records_instantiation(cps_subsample):
adjust_ratios=[])


def test_correct_Records_instantiation(cps_subsample):
def test_correct_records_instantiation(cps_subsample):
rec1 = Records.cps_constructor(data=cps_subsample, gfactors=None)
assert rec1
assert np.all(rec1.MARS != 0)
Expand Down

0 comments on commit dfb578c

Please sign in to comment.