From 73e43dd34865c3888d51b544cd08470957ac7225 Mon Sep 17 00:00:00 2001 From: Garry Bowlin <171296429+gbowlin@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:15:19 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: diehlbw <36572844+diehlbw@users.noreply.github.com> --- src/seismometer/controls/explore.py | 2 +- src/seismometer/report/fairness.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seismometer/controls/explore.py b/src/seismometer/controls/explore.py index 0e78477..7ee35bb 100644 --- a/src/seismometer/controls/explore.py +++ b/src/seismometer/controls/explore.py @@ -913,7 +913,7 @@ def update_plot(self, initial: bool = False): self.update_plot_widget.disabled = True def _try_generate_plot(self) -> Any: - """Attempt to generate the plot. Displaying the error at HTML""" + """Attempt to generate the plot. Displaying the error as HTML""" try: plot_args, plot_kwargs = self.generate_plot_args() self.current_plot_code = self.generate_plot_code(plot_args, plot_kwargs) diff --git a/src/seismometer/report/fairness.py b/src/seismometer/report/fairness.py index d7f225d..0202f16 100644 --- a/src/seismometer/report/fairness.py +++ b/src/seismometer/report/fairness.py @@ -60,7 +60,7 @@ def get_fairness_icon(cls, ratio, limit: float = 0.25) -> "FairnessIcons": If fairness ratio is 0.25 (25%) we want to show a warning if we are outside this range and a critical warning if we are 2x outside this range - We are looking at 1 / (1 + limit) < allowed_ration < 1 + limit + We are looking at 1 / (1 + limit) < ratio < 1 + limit For a limit of 0.25 we are looking at 0.80 < ratio < 1.25 (25% bigger, or 20% smaller) Alternatively for a limit of 0.50 we are looking at 0.67 < ratio < 1.50 (50% bigger, or 33% smaller)