diff --git a/fiscalsim_us/__init__.py b/fiscalsim_us/__init__.py index 830ed641f..e231a7456 100644 --- a/fiscalsim_us/__init__.py +++ b/fiscalsim_us/__init__.py @@ -7,6 +7,7 @@ See https://openfisca.org/doc/key-concepts/tax_and_benefit_system.html """ + from fiscalsim_us.system import ( CountryTaxBenefitSystem, Simulation, diff --git a/fiscalsim_us/tools/taxcalc/generate_taxcalc_variable.py b/fiscalsim_us/tools/taxcalc/generate_taxcalc_variable.py index 2e3fc2c93..b42cb2f06 100644 --- a/fiscalsim_us/tools/taxcalc/generate_taxcalc_variable.py +++ b/fiscalsim_us/tools/taxcalc/generate_taxcalc_variable.py @@ -62,9 +62,11 @@ def formula(tax_unit, period, parameters): dict( entity=TaxUnit, definition_period=YEAR, - label=variable.label + " (Tax-Calculator)" - if hasattr(variable, "label") - else name + "(Tax-Calculator)", + label=( + variable.label + " (Tax-Calculator)" + if hasattr(variable, "label") + else name + "(Tax-Calculator)" + ), unit=variable.unit if hasattr(variable, "unit") else None, documentation=documentation, value_type=variable.value_type, diff --git a/fiscalsim_us/tools/taxsim/generate_taxsim_tests.py b/fiscalsim_us/tools/taxsim/generate_taxsim_tests.py index 978582e21..66d8f77ec 100644 --- a/fiscalsim_us/tools/taxsim/generate_taxsim_tests.py +++ b/fiscalsim_us/tools/taxsim/generate_taxsim_tests.py @@ -132,9 +132,11 @@ def calculate(self, input_data: dict) -> dict: else: input_csv = pd.DataFrame( { - col: [value] - if not isinstance(value, collections.Sequence) - else value + col: ( + [value] + if not isinstance(value, collections.Sequence) + else value + ) for col, value in input_data.items() } ) diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction.py index a5c65e673..d1b61fe82 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction.py @@ -10,7 +10,7 @@ class co_charitable_contribution_subtraction(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://casetext.com/regulation/colorado-administrative-code/department-200-department-of-revenue/division-201-taxation-division/rule-1-ccr-201-2-income-tax/rule-39-22-1044m-charitable-contribution-subtraction-for-taxpayers-claiming-the-federal-standard-deduction" + "https://casetext.com/regulation/colorado-administrative-code/department-200-department-of-revenue/division-201-taxation-division/rule-1-ccr-201-2-income-tax/rule-39-22-1044m-charitable-contribution-subtraction-for-taxpayers-claiming-the-federal-standard-deduction", # C.R.S. 39-22-104(4)(m)(1) ) defined_for = "co_charitable_contribution_subtraction_eligible" diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction_eligible.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction_eligible.py index 34e1e6c2f..a54bd577f 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction_eligible.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/charitable_contribution/co_charitable_contribution_subtraction_eligible.py @@ -9,7 +9,7 @@ class co_charitable_contribution_subtraction_eligible(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://casetext.com/regulation/colorado-administrative-code/department-200-department-of-revenue/division-201-taxation-division/rule-1-ccr-201-2-income-tax/rule-39-22-1044m-charitable-contribution-subtraction-for-taxpayers-claiming-the-federal-standard-deduction" + "https://casetext.com/regulation/colorado-administrative-code/department-200-department-of-revenue/division-201-taxation-division/rule-1-ccr-201-2-income-tax/rule-39-22-1044m-charitable-contribution-subtraction-for-taxpayers-claiming-the-federal-standard-deduction", # C.R.S. 39-22-104(4)(m)(1) ) defined_for = StateCode.CO diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py index 56c9346b7..e35a59374 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/collegeinvest_contribution/co_collegeinvest_subtraction.py @@ -10,7 +10,7 @@ class co_collegeinvest_subtraction(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(i)(II)(B) ) defined_for = StateCode.CO diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/military_retirement/co_military_retirement_subtraction.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/military_retirement/co_military_retirement_subtraction.py index 64575e389..331887534 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/military_retirement/co_military_retirement_subtraction.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/military_retirement/co_military_retirement_subtraction.py @@ -10,7 +10,7 @@ class co_military_retirement_subtraction(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(y)(I) ) definition_period = YEAR diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv.py index 591276ee2..a6b064f7e 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv.py @@ -10,7 +10,7 @@ class co_pension_subtraction_indv(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(g)(III) ) definition_period = YEAR diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv_eligible..py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv_eligible..py index 0a5072dc6..9a1b8a8c0 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv_eligible..py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_pension_subtraction_indv_eligible..py @@ -9,7 +9,7 @@ class co_pension_subtraction_indv_eligible(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(g)(III) ) definition_period = YEAR diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv.py index 26e7e45bf..ffb1ec794 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv.py @@ -10,7 +10,7 @@ class co_social_security_subtraction_indv(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(g)(III) ) definition_period = YEAR diff --git a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv_eligible.py b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv_eligible.py index 0ace2a33e..11287fc38 100644 --- a/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv_eligible.py +++ b/fiscalsim_us/variables/gov/states/co/tax/income/subtractions/pension/co_social_security_subtraction_indv_eligible.py @@ -10,7 +10,7 @@ class co_social_security_subtraction_indv_eligible(Variable): reference = ( "https://tax.colorado.gov/sites/tax/files/documents/DR0104AD_2022.pdf#page=1", "https://tax.colorado.gov/sites/tax/files/documents/DR_104_Book_2022.pdf#page=12", - "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/" + "https://law.justia.com/codes/colorado/2022/title-39/article-22/part-1/section-39-22-104/", # C.R.S. 39-22-104(4)(g)(III) ) definition_period = YEAR diff --git a/fiscalsim_us/variables/gov/states/sc/tax/income/deductions/net_capital_gain/sc_net_capital_gain_deduction.py b/fiscalsim_us/variables/gov/states/sc/tax/income/deductions/net_capital_gain/sc_net_capital_gain_deduction.py index b8e48f033..f2325b642 100644 --- a/fiscalsim_us/variables/gov/states/sc/tax/income/deductions/net_capital_gain/sc_net_capital_gain_deduction.py +++ b/fiscalsim_us/variables/gov/states/sc/tax/income/deductions/net_capital_gain/sc_net_capital_gain_deduction.py @@ -10,7 +10,7 @@ class sc_net_capital_gain_deduction(Variable): defined_for = StateCode.SC reference = ( "https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=15", - "https://www.scstatehouse.gov/code/t12c006.php" + "https://www.scstatehouse.gov/code/t12c006.php", # South Carolina Code of Laws Section 12-6-1150 (A) )