Skip to content

Commit

Permalink
Fix pylint R1721 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 3, 2025
1 parent 9b5b760 commit e0888c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion taxcalc/tests/test_compatible_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def fixture_sorted_param_names(allparams):


@pytest.fixture(scope='module', name='allparams_batch',
params=[i for i in range(0, BATCHES)])
params=list(range(0, BATCHES)))
def fixture_allparams_batch(request, allparams, sorted_param_names):
"""
Fixture for grouping Tax-Calculator parameters
Expand Down
5 changes: 2 additions & 3 deletions taxcalc/tests/test_reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import pytest
import numpy as np
import pandas as pd
# pylint: disable=import-error
from taxcalc import Calculator, Policy, Records
from taxcalc import Calculator, Policy, Records # pylint: disable=import-error


def test_2017_law_reform(tests_path):
Expand Down Expand Up @@ -342,7 +341,7 @@ def fixture_reforms_dict(tests_path):


@pytest.mark.requires_pufcsv
@pytest.mark.parametrize('rid', [i for i in range(1, NUM_REFORMS + 1)])
@pytest.mark.parametrize('rid', list(range(1, NUM_REFORMS + 1)))
def test_reforms(rid, test_reforms_init, tests_path, baseline_2017_law,
reforms_dict, puf_subsample):
"""
Expand Down
6 changes: 3 additions & 3 deletions taxcalc/tests/test_taxcalcio.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def test_no_tables_or_graphs(reformfile1):
# create input sample that cannot output tables or graphs
nobs = 10
idict = {}
idict['RECID'] = [i for i in range(1, nobs + 1)]
idict['RECID'] = list(range(1, nobs + 1))
idict['MARS'] = [2 for i in range(1, nobs + 1)]
idict['s006'] = [0.0 for i in range(1, nobs + 1)]
idict['e00300'] = [10000 * i for i in range(1, nobs + 1)]
Expand Down Expand Up @@ -581,7 +581,7 @@ def test_tables(reformfile1):
# create tabable input
nobs = 100
idict = {}
idict['RECID'] = [i for i in range(1, nobs + 1)]
idict['RECID'] = list(range(1, nobs + 1))
idict['MARS'] = [2 for i in range(1, nobs + 1)]
idict['s006'] = [10.0 for i in range(1, nobs + 1)]
idict['e00300'] = [10000 * i for i in range(1, nobs + 1)]
Expand Down Expand Up @@ -618,7 +618,7 @@ def test_graphs(reformfile1):
# create graphable input
nobs = 100
idict = {}
idict['RECID'] = [i for i in range(1, nobs + 1)]
idict['RECID'] = list(range(1, nobs + 1))
idict['MARS'] = [2 for i in range(1, nobs + 1)]
idict['XTOT'] = [3 for i in range(1, nobs + 1)]
idict['s006'] = [10.0 for i in range(1, nobs + 1)]
Expand Down

0 comments on commit e0888c9

Please sign in to comment.