Closed AbstractBeliefs closed 3 years ago
(I'm quite sure that test failure isn't anything to do with this change)
Thanks! What does the #
do in the format string? Normally I would see this written as f"{growth_rate:.2}"
It's used to force a decimal point, but I don't think in this context it's important - it can be removed. https://docs.python.org/3/library/string.html#format-specification-mini-language
The way that growth_rate is calculated in models.py allows for float representation issues to creep in, which are then propagated to your plants info view when via views.py . Adjusting the format specification allows us to limit output to a single decimal place.