Skip to content

Commit

Permalink
fix: don't divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ytausch committed Jan 8, 2025
1 parent 2f0c4c7 commit 1f9f742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conda_forge_tick/make_migrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _compute_migrator_pr_limit(
number_pred += 1

tot_nodes = len(migrator.graph.nodes)
frac_pred = number_pred / tot_nodes
frac_pred = number_pred / tot_nodes if tot_nodes > 0 else 1.0

Check warning on line 153 in conda_forge_tick/make_migrators.py

View check run for this annotation

Codecov / codecov/patch

conda_forge_tick/make_migrators.py#L153

Added line #L153 was not covered by tests

tenth = int(tot_nodes / 10)
quarter = int(tot_nodes / 4)
Expand Down

0 comments on commit 1f9f742

Please sign in to comment.