Skip to content

Commit

Permalink
Streamline tmd logic in taxcalcio.py code
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Sep 24, 2024
1 parent fc222b7 commit a3b8402
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion taxcalc/taxcalcio.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def __init__(self, input_data, tax_year, baseline, reform, assump,
if self.tmd_input_data: # pragma: no cover
tmd_dir = os.path.dirname(input_data)
if 'TMD_AREA' in os.environ:
wfile = f'{os.environ["TMD_AREA"]}_tmd_weights.csv.gz'
area = os.environ['TMD_AREA']
wfile = f'{area}_tmd_weights.csv.gz'
inp = f'{fname[:-4]}_{area}-{str(tax_year)[2:]}'
else: # using national weights
wfile = 'tmd_weights.csv.gz'
self.tmd_weights = os.path.join(tmd_dir, wfile)
Expand Down

0 comments on commit a3b8402

Please sign in to comment.