From 1997f96232470b26e4d5729a519c2288989b75ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Sun, 21 Jun 2026 16:37:52 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20definice=20typ=C5=AF=20u=20funkc?= =?UTF-8?q?=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index d6e531a..327e079 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +from typing import Any from random import randint from os import system, name import re @@ -23,7 +24,7 @@ def throw(count: int) -> str: new_throw = "".join(new_throw) return new_throw -def show_throw(throw): +def show_throw(throw: str) -> str: throw_temp = [] for x in throw: throw_temp.append(x) @@ -43,7 +44,7 @@ def clear(): else: _ = system('clear') -def evaluate(inp, count, throw): +def evaluate(inp: Any, count: int, throw: str) -> tuple: inp = str(inp) if re.search("^\d+$", inp): if len(inp) > count: @@ -68,7 +69,7 @@ def evaluate(inp, count, throw): data = ("count", count, old_throw) return data -def check_value(throw): +def check_value(throw: str) -> bool: throw_s = sorted(throw) throw_str = "".join(throw_s) hodnota = False