Skip to content

Commit 1854669

Browse files
committed
Fix parenthesis in rating calculation
1 parent e265148 commit 1854669

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,10 @@ def complete_task(task_id) -> Response: # complete task from task ID
444444
current_time # set last time clicked to current time
445445
)
446446
user.rating += max(
447-
(
448-
(10 + math.log(max(user.rating + 100, 100)) ** 2)
449-
* repeat_multiplier
450-
* (1 - due_multiplier)
451-
if due_multiplier < 1
452-
else (due_multiplier - 1) / max(user.daily_tasks_completed, 1)
453-
),
447+
(10 + math.log(max(user.rating + 100, 100)) ** 2)
448+
* repeat_multiplier
449+
* ((1 - due_multiplier) if due_multiplier < 1 else (due_multiplier - 1))
450+
/ max(user.daily_tasks_completed, 1),
454451
0,
455452
) # increase user rating score based on user rating, task repeat multiplier and number of tasks completed today
456453
user.rating = max(

0 commit comments

Comments
 (0)