Skip to content

Commit

Permalink
Reformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
vahid-ahmadi committed Jan 14, 2025
1 parent c7c6762 commit 59e1b78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class child_age_eligible(Variable):
value_type = bool
entity = Person
label = "Child age eligibility requirements"
documentation = (
"Whether this person meets the age and disability requirements for eligibility"
)
documentation = "Whether this person meets the age and disability requirements for eligibility"
definition_period = YEAR

def formula(person, period, parameters):
Expand Down Expand Up @@ -35,5 +33,7 @@ def formula(person, period, parameters):
age_under_disability_limit = (age < disability_age_limit).astype(bool)

# Combine conditions
combined_condition = (age_under_disability_limit & is_disabled).astype(bool)
combined_condition = (age_under_disability_limit & is_disabled).astype(
bool
)
return (basic_age_condition | combined_condition).astype(bool)
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class childcare_work_condition(Variable):
value_type = bool
entity = Person
label = "Work conditions for tax-free childcare"
documentation = (
"Whether the person/couple meets work requirements for tax-free childcare"
)
documentation = "Whether the person/couple meets work requirements for tax-free childcare"
definition_period = YEAR

def formula(person, period, parameters):
Expand All @@ -31,7 +29,9 @@ def formula(person, period, parameters):
| (add(person, period, severe_disability_benefits) > 0)
).astype(bool)

has_incapacity = (person("incapacity_benefit", period) > 0).astype(bool)
has_incapacity = (person("incapacity_benefit", period) > 0).astype(
bool
)
has_condition = (is_disabled | has_incapacity).astype(bool)

# Build conditions
Expand All @@ -49,5 +49,7 @@ def formula(person, period, parameters):
).astype(bool)

return (
single_working | couple_both_working | couple_one_working_one_disabled
single_working
| couple_both_working
| couple_one_working_one_disabled
).astype(bool)

0 comments on commit 59e1b78

Please sign in to comment.