From 985ad82767aa109e47b488503421bab58888a541 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Jan 2026 04:32:03 +0000 Subject: [PATCH] Fix docstring typos and remove stale TODO - Fix duplicate "works works" -> "works" in growth_rate_to_doubling_time and doubling_time_to_growth_rate docstrings - Remove "(TODO: Fix tests)" from CHANGES.md since third_kelly tests now pass --- CHANGES.md | 2 +- squigglepy/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index acbaa1e..5c60514 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ * Fixes a bug where `error` was not correctly passed from `half_kelly`, `third_kelly`, and `quarter_kelly`. * Added `invlognorm` as a new distribution. * Added `bucket_percentages` to more easily get the percentage of values within a bucket. -* Added `third_kelly` as an alias for `kelly` with deference = 0.66. (TODO: Fix tests) +* Added `third_kelly` as an alias for `kelly` with deference = 0.66. * Allows Bernoulli distributions to be defined with p=0 or p=1 * Added a `Makefile` to help simplify testing and linting workflows diff --git a/squigglepy/utils.py b/squigglepy/utils.py index 175e306..71ca07b 100644 --- a/squigglepy/utils.py +++ b/squigglepy/utils.py @@ -823,7 +823,7 @@ def growth_rate_to_doubling_time(growth_rate): where 0.05 means +5% to a doubling time. The time unit remains the same, so if we've got +5% annual growth, the returned value is the doubling time in years. - NOTE: This only works works for numbers, arrays and distributions where all numbers + NOTE: This only works for numbers, arrays and distributions where all numbers are above 0. (Otherwise it makes no sense to talk about doubling times.) Parameters @@ -860,7 +860,7 @@ def doubling_time_to_growth_rate(doubling_time): same, so if we've got a doubling time of 2 years, the returned value is the annual growth rate. - NOTE: This only works works for numbers, arrays and distributions where all numbers + NOTE: This only works for numbers, arrays and distributions where all numbers are above 0. (Otherwise it makes no sense to talk about doubling times.) Parameters