fixup! Extended type annotations

This commit is contained in:
Tobias Schmidl 2019-07-19 06:58:24 +02:00
parent fde2556e47
commit e1d2ed9990

View file

@ -92,7 +92,8 @@ def httping(targets: List[str]) -> Tuple[Dict[str, Optional[float]], Optional[fl
if __name__ == "__main__":
responses, median, stddev = httping(TARGETS)
if isinstance(median, float) and median != MAX_PING_IN_MS:
print("⦿ " + str(round(median, 2)) + "±" + str(round(stddev, 2)) + " | color=" + CURRENT_THEME.colorize(median)) # type: ignore
print("⦿ " + str(round(median, 2)) + "±" + str(round(stddev, 2)) + " | color=" +
CURRENT_THEME.colorize(median)) # type: ignore
else:
print("☠ | color=" + CURRENT_THEME.selected_colors[0])
print("---")