Skip to content

Commit

Permalink
pep8 whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pbugni committed Mar 29, 2024
1 parent da354c1 commit 92a501f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion portal/trigger_states/empro_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def eval(self):
sequential_hard_trigger_count and
self.previous_triggers and
sequential_hard_trigger_count_key in self.previous_triggers):
sequential_hard_trigger_count = self.previous_triggers[sequential_hard_trigger_count_key] + 1
sequential_hard_trigger_count = (
self.previous_triggers[sequential_hard_trigger_count_key] + 1)
self._triggers[sequential_hard_trigger_count_key] = sequential_hard_trigger_count


Expand Down
3 changes: 2 additions & 1 deletion portal/trigger_states/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ def rebuild_trigger_states(patient):
if not tl_query.count():
# User has no timeline data for EMPRO, likely not eligible
if TriggerState.query.filter(TriggerState.user_id == patient.id).count():
current_app.logging.error(f"no EMPRO timeline, yet trigger_states rows for {patient.id}")
current_app.logging.error(
f"no EMPRO timeline, yet trigger_states rows for {patient.id}")
return

# Capture state in memory for potential reuse when rebuilding
Expand Down
2 changes: 1 addition & 1 deletion tests/test_trigger_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_apply_opt_out(initialized_patient, processed_ts, opt_out_submission):
user = db.session.merge(initialized_patient)
ts = users_trigger_state(user.id)
result = ts.apply_opt_out(opt_out_submission)
found = [k for k,v in result.triggers['domain'].items() if opt_out_this_visit_key in v]
found = [k for k, v in result.triggers['domain'].items() if opt_out_this_visit_key in v]
assert len(found) == 2


Expand Down

0 comments on commit 92a501f

Please sign in to comment.