Skip to content

Commit 00a5bf6

Browse files
Removed redundant if condition and corrected comments
* removed redundant if condition and corrected comments * lint fixed
1 parent 888ff49 commit 00a5bf6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/eligibility_signposting_api/services/calculators/eligibility_calculator.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ def get_the_base_eligible_campaigns(self, campaign_group: list[rules.CampaignCon
6363
"""Return campaigns for which the person is base eligible via cohorts."""
6464

6565
base_eligible_campaigns: list[rules.CampaignConfig] = [
66-
campaign
67-
for campaign in campaign_group
68-
if campaign.campaign_live
69-
and campaign.current_iteration
70-
and self.check_base_eligibility(campaign.current_iteration)
66+
campaign for campaign in campaign_group if self.check_base_eligibility(campaign.current_iteration)
7167
]
7268

7369
if base_eligible_campaigns:
@@ -91,8 +87,8 @@ def check_base_eligibility(self, iteration: rules.Iteration | None) -> set[str]:
9187
def evaluate_eligibility_by_iteration_rules(
9288
self, campaign_group: list[rules.CampaignConfig]
9389
) -> tuple[eligibility.Status, list[eligibility.Reason]]:
94-
"""Evaluate iteration rules to see if the person is actionable, not actionable (due to "F" rules),
95-
or not eligible (due to "S" rules").
90+
"""Evaluate iteration rules to see if the person is actionable, not actionable (due to "S" rules),
91+
or not eligible (due to "F" rules").
9692
9793
For each condition, evaluate all iterations for inclusion or exclusion."""
9894

0 commit comments

Comments
 (0)