Skip to content

Commit

Permalink
Fix pylint R1714 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 3, 2025
1 parent f304797 commit 2962382
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 5 additions & 6 deletions docs/guide/make/make_uguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,18 @@

def main():
# Policy parameters.
policy_param_text = make_params.make_params(POLICY_PATH, 'policy')
policy_param_text = make_params(POLICY_PATH, 'policy')
write_file(policy_param_text, 'policy_params')
# Assumption parameters, created separately for growdiff and consumption.
growdiff_param_text = make_params.make_params(GROWDIFF_PATH, 'growdiff')
consumption_param_text = make_params.make_params(CONSUMPTION_PATH,
'consumption')
growdiff_param_text = make_params(GROWDIFF_PATH, 'growdiff')
consumption_param_text = make_params(CONSUMPTION_PATH, 'consumption')
assumption_param_text = ('## Growdiff\n\n' + growdiff_param_text +
'\n\n## Consumption\n\n' + consumption_param_text)
write_file(assumption_param_text, 'assumption_params')
# Input and output variables.
input_var_text = make_io_vars.make_io_vars(IOVARS_PATH, 'read')
input_var_text = make_io_vars(IOVARS_PATH, 'read')
write_file(input_var_text, 'input_vars')
output_var_text = make_io_vars.make_io_vars(IOVARS_PATH, 'calc')
output_var_text = make_io_vars(IOVARS_PATH, 'calc')
write_file(output_var_text, 'output_vars')
# Normal return code
return 0
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/tests/test_growdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_boolean_value_infomation(tests_path):
if isinstance(val, list):
val = val[0]
valstr = str(val)
if valstr == 'True' or valstr == 'False':
if valstr in ('True', 'False'):
val_is_boolean = True
else:
val_is_boolean = False
Expand Down
3 changes: 1 addition & 2 deletions taxcalc/tests/test_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ def test_records_variables_content(tests_path):
assert msg1 == msg2
prior_eyr = eyr
if not indefinite_yrange and len(yranges) > 0:
prior_ey_ok = (prior_eyr == last_form_year or
prior_eyr == last_form_year - 1)
prior_ey_ok = prior_eyr in (last_form_year, last_form_year - 1)
if not prior_ey_ok:
msg1 = '{} prior_eyr {}'.format(vname, prior_eyr)
msg2 = '!= last_form_year {}'.format(last_form_year)
Expand Down

0 comments on commit 2962382

Please sign in to comment.