From 7c482e66381dac64c379e7293529d08c5feaa859 Mon Sep 17 00:00:00 2001 From: Bodi Yang Date: Mon, 11 Mar 2024 10:32:01 -0400 Subject: [PATCH] reformat --- history/report.py | 1 + history/report_utils.py | 1 + inithash.py | 1 + puf_stage1/factors_finalprep.py | 1 + puf_stage1/updatecbo.py | 1 + taxdata/cps/cps_meta.py | 1 + taxdata/cps/finalprep.py | 1 + taxdata/cps/splitincome.py | 1 + taxdata/cps/targeting.py | 1 + taxdata/cps/transform_sas.py | 1 + taxdata/puf/impute_itmexp.py | 1 + taxdata/puf/impute_pencon.py | 1 + taxdata/puf/preppuf.py | 1 + tests/test_data.py | 1 + tests/test_ratios.py | 1 + tests/test_weights.py | 1 + 16 files changed, 16 insertions(+) diff --git a/history/report.py b/history/report.py index 3e5240ed..d51cf3b6 100644 --- a/history/report.py +++ b/history/report.py @@ -2,6 +2,7 @@ Script used to automatically generate PDF report comparing TaxData outputs after updates """ + # flake8: noqa: E501 import argparse import pandas as pd diff --git a/history/report_utils.py b/history/report_utils.py index 5d640d14..3023cb54 100644 --- a/history/report_utils.py +++ b/history/report_utils.py @@ -1,6 +1,7 @@ """ Utility functions used by report.py """ + import pypandoc import pandas as pd import numpy as np diff --git a/inithash.py b/inithash.py index 27ac7b8d..bbb7b08b 100644 --- a/inithash.py +++ b/inithash.py @@ -1,6 +1,7 @@ """ This script creates the initial hashes for each stage 2 file """ + import json import hashlib from pathlib import Path diff --git a/puf_stage1/factors_finalprep.py b/puf_stage1/factors_finalprep.py index 26f7ac0f..cd6ffd70 100644 --- a/puf_stage1/factors_finalprep.py +++ b/puf_stage1/factors_finalprep.py @@ -2,6 +2,7 @@ Transform Stage_I_factors.csv (written by the stage1.py script) and benefit_growth_rates.csv into growfactors.csv (used by Tax-Calculator). """ + import pandas as pd import os diff --git a/puf_stage1/updatecbo.py b/puf_stage1/updatecbo.py index e54ec603..51990f35 100644 --- a/puf_stage1/updatecbo.py +++ b/puf_stage1/updatecbo.py @@ -5,6 +5,7 @@ there is a bug, it's probably because that assumption no longer holds true. When this happens, modify the code as needed to account for this. """ + import re import requests import pandas as pd diff --git a/taxdata/cps/cps_meta.py b/taxdata/cps/cps_meta.py index 0ba3f31d..ca1f950c 100644 --- a/taxdata/cps/cps_meta.py +++ b/taxdata/cps/cps_meta.py @@ -1,6 +1,7 @@ """ Holds all the CPS file metadata we need. Created to keep create.py clean """ + C_TAM_YEARS = [2013, 2014, 2015] # years we have C-TAM imputations for CPS_META_DATA = { diff --git a/taxdata/cps/finalprep.py b/taxdata/cps/finalprep.py index ec15f732..4b2c23a0 100644 --- a/taxdata/cps/finalprep.py +++ b/taxdata/cps/finalprep.py @@ -1,6 +1,7 @@ """ Clean up the CPS file and make it ready for Tax-Calculator """ + import numpy as np import pandas as pd import copy diff --git a/taxdata/cps/splitincome.py b/taxdata/cps/splitincome.py index 285c32d8..901794fb 100644 --- a/taxdata/cps/splitincome.py +++ b/taxdata/cps/splitincome.py @@ -1,6 +1,7 @@ """ Split up certain income variables """ + import numpy as np diff --git a/taxdata/cps/targeting.py b/taxdata/cps/targeting.py index 6e4ba557..d19cdee8 100644 --- a/taxdata/cps/targeting.py +++ b/taxdata/cps/targeting.py @@ -1,6 +1,7 @@ """ State level targeting of certain income variables """ + import pandas as pd import numpy as np from .constants import FIPS_DICT diff --git a/taxdata/cps/transform_sas.py b/taxdata/cps/transform_sas.py index 1e0ad47c..44d3eaa3 100644 --- a/taxdata/cps/transform_sas.py +++ b/taxdata/cps/transform_sas.py @@ -2,6 +2,7 @@ Scripts to convert the SAS scripts used to process the .DAT format CPS file to Python """ + import pickle from pathlib import Path from .cps_meta import CPS_META_DATA diff --git a/taxdata/puf/impute_itmexp.py b/taxdata/puf/impute_itmexp.py index 1a5a44df..375be343 100644 --- a/taxdata/puf/impute_itmexp.py +++ b/taxdata/puf/impute_itmexp.py @@ -32,6 +32,7 @@ Non-Itemizers, 2011." (Comments below contain more detail on this procedure.) """ + from __future__ import print_function import numpy as np import pandas as pd diff --git a/taxdata/puf/impute_pencon.py b/taxdata/puf/impute_pencon.py index 40cbdea4..36d886ba 100644 --- a/taxdata/puf/impute_pencon.py +++ b/taxdata/puf/impute_pencon.py @@ -38,6 +38,7 @@ process twice. See the impute_pension_contributions() function code for details. """ + from __future__ import print_function import sys import numpy as np diff --git a/taxdata/puf/preppuf.py b/taxdata/puf/preppuf.py index f721c756..ec7a4b44 100644 --- a/taxdata/puf/preppuf.py +++ b/taxdata/puf/preppuf.py @@ -1,6 +1,7 @@ """ Scripts to clean up the raw PUF before matching """ + import numpy as np # RECIDs for aggregate variables by PUF year diff --git a/tests/test_data.py b/tests/test_data.py index 4f7bf86e..70450c81 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,6 +1,7 @@ """ Test CPS and PUF data file contents. """ + import os import pytest import numpy as np diff --git a/tests/test_ratios.py b/tests/test_ratios.py index 4fcda353..c53aceee 100644 --- a/tests/test_ratios.py +++ b/tests/test_ratios.py @@ -1,6 +1,7 @@ """ Test PUF adjust-ratio file contents. """ + import pytest diff --git a/tests/test_weights.py b/tests/test_weights.py index cd41a20e..adb09bb9 100644 --- a/tests/test_weights.py +++ b/tests/test_weights.py @@ -1,6 +1,7 @@ """ Test CPS and PUF weights file contents. """ + import pytest import numpy as np