Closed Psycojoker closed 3 weeks ago
The PR introduces minor changes in the _format_score
function, modifying the function signature and its return type. The changes are localized and unlikely to have a significant impact on the rest of the codebase. The changes in the _show_compute
function are also minor, affecting only the formatting of node rewards. These modifications are simple enough to be categorized as 'BLUE'.
_format_score
function now returns a text.Text
object instead of a float.node_reward
variable is removed in the _show_compute
function._show_compute
function.-def _format_score(score: float):
+def _format_score(score: float) -> text.Text:
if score < 0.5:
return text.Text(f"{score:.2%}", style="red", justify="right")
elif score < 0.75:
creation_time = datetime.datetime.fromtimestamp(node["time"]).strftime("%Y-%m-%d %H:%M:%S")
- score = _format_score(node["score"])
+ score = _format_score(node["score"]).plain
node_name = _escape_and_normalize(node_name)
node_name = _remove_ansi_escape(node_name)
node_hash = node["hash"]