style: drobný úklid pro ruff a mypy
key bez zbytečného str(), odstranění count = int(count) v throw().
This commit is contained in:
1 parent
b3650b7243
commit
21efddc1a0
1 file changed
+1
-2
+1
-2
@@ -20,7 +20,7 @@ csv_text = files(__package__).joinpath("hodnoty.csv").read_text(encoding="utf-8"
|
|||||||
csv_reader = csv.reader(csv_text.splitlines())
|
csv_reader = csv.reader(csv_text.splitlines())
|
||||||
|
|
||||||
for row in csv_reader:
|
for row in csv_reader:
|
||||||
key = str(row[0])
|
key = row[0]
|
||||||
value = int(row[1])
|
value = int(row[1])
|
||||||
|
|
||||||
hodnoty[key] = value
|
hodnoty[key] = value
|
||||||
@@ -28,7 +28,6 @@ for row in csv_reader:
|
|||||||
hodnoty = dict(sorted(hodnoty.items(), key=lambda x: x[1], reverse=True))
|
hodnoty = dict(sorted(hodnoty.items(), key=lambda x: x[1], reverse=True))
|
||||||
|
|
||||||
def throw(count: int) -> str:
|
def throw(count: int) -> str:
|
||||||
count = int(count)
|
|
||||||
new_throw: list[str] = []
|
new_throw: list[str] = []
|
||||||
for _dice in range(count):
|
for _dice in range(count):
|
||||||
new_throw.append(str(randint(1, 6)))
|
new_throw.append(str(randint(1, 6)))
|
||||||
|
|||||||
Reference in new issue
Block a user