| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead. |
Sorry, something went wrong.
|
Test failures are unrelated. BTW, I think this small fix is fine for backports (issue valid for v3.13). |
Sorry, something went wrong.
The error message was constructed with two positional arguments to
StatisticsError, causing str(e) to display as a tuple:
"('No negative inputs allowed', -2.0)". Use an f-string instead so
the value is embedded directly in the message string.
|
Thanks for the review! |
Sorry, something went wrong.
|
In order to keep the commit history intact, please avoid squashing or amending history and then force-pushing to the PR. Reviewers often want to look at individual commits. When the PR is merged, everything will be squashed into a single commit. |
Sorry, something went wrong.
|
Let's not backport this. Besides being a minor edit, it wasn't actually wrong. We sometimes to supply the value object as the last element of the tuple so that a user can extract it. In this particular case, I approved the edit because the result looks nice and because the tuple with value style is not used elsewhere in this module. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
geometric_mean() raised StatisticsError with two positional arguments,
causing str(e) to display as a tuple:
('No negative inputs allowed', -2.0)Every other StatisticsError in the module uses a single string message.
Replaced with an f-string so the message reads: