Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 16, 2024
1 parent 9957046 commit e248f53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class would_claim_uc(Variable):
definition_period = YEAR

def formula(benunit, period, parameters):
takes_up = random(benunit) < parameters(period).gov.dwp.universal_credit.takeup_rate
takes_up = (
random(benunit)
< parameters(period).gov.dwp.universal_credit.takeup_rate
)
is_in_microsimulation = benunit.simulation.dataset is not None
if is_in_microsimulation:
return takes_up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ def formula_2018_06_01(person, period, parameters):
scottish_band = select(
[
income < threshold
for threshold in rates.scotland.rates.thresholds[
:5
]
for threshold in rates.scotland.rates.thresholds[:5]
],
[
TaxBand.NONE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ def formula(person, period, parameters):

return where(
person("pays_scottish_income_tax", period),
rates.scotland.rates.calc(
person("earned_taxable_income", period)
),
rates.scotland.rates.calc(person("earned_taxable_income", period)),
rates.uk.calc(person("earned_taxable_income", period)),
)

0 comments on commit e248f53

Please sign in to comment.