Skip to content

Commit

Permalink
Handle types correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Feb 23, 2025
1 parent ce2f17f commit 5b8a6ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions policyengine_api/endpoints/economy/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,11 @@ def compare_economic_outputs(
poverty_by_race_data = poverty_racial_breakdown(baseline, reform)
intra_decile_impact_data = intra_decile_impact(baseline, reform)
labor_supply_response_data = labor_supply_response(baseline, reform)
constituency_impact_data = (
uk_constituency_breakdown(baseline, reform, country_id).dict()
or {}
constituency_impact_data = uk_constituency_breakdown(

Check warning on line 644 in policyengine_api/endpoints/economy/compare.py

View check run for this annotation

Codecov / codecov/patch

policyengine_api/endpoints/economy/compare.py#L644

Added line #L644 was not covered by tests
baseline, reform, country_id
)
if constituency_impact_data is not None:
constituency_impact_data = constituency_impact_data.model_dump()

Check warning on line 648 in policyengine_api/endpoints/economy/compare.py

View check run for this annotation

Codecov / codecov/patch

policyengine_api/endpoints/economy/compare.py#L648

Added line #L648 was not covered by tests
try:
wealth_decile_impact_data = wealth_decile_impact(baseline, reform)
intra_wealth_decile_impact_data = intra_wealth_decile_impact(
Expand Down

0 comments on commit 5b8a6ed

Please sign in to comment.