Skip to content

Commit 7365408

Browse files
committed
Clearer docstrings
1 parent ae56d08 commit 7365408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

learning_resources/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def best_run(self) -> Optional["LearningResourceRun"]:
574574
),
575575
)
576576

577-
# If no current enrollable run found, find the next upcoming run
577+
# If no enrollable runs found, find the next upcoming run
578578
upcoming_runs = [
579579
run
580580
for run in published_runs
@@ -583,7 +583,7 @@ def best_run(self) -> Optional["LearningResourceRun"]:
583583
if upcoming_runs:
584584
return min(upcoming_runs, key=lambda r: r.start_date)
585585

586-
# If current_run is still null, return the run with the latest start date
586+
# No enrollable/upcoming runs, return run with the latest start date
587587
runs_with_dates = [run for run in published_runs if run.start_date]
588588
if runs_with_dates:
589589
return max(runs_with_dates, key=lambda r: r.start_date)

0 commit comments

Comments
 (0)