mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
misc: fix seed type issue
This commit is contained in:
+1
-1
@@ -922,7 +922,7 @@ def create_player(
|
|||||||
name: str, race: Race, class_: Class, stats: Stats
|
name: str, race: Race, class_: Class, stats: Stats
|
||||||
) -> Player:
|
) -> Player:
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
random.seed(now)
|
random.seed(str(now))
|
||||||
player = Player(
|
player = Player(
|
||||||
birthday=now, name=name, race=race, class_=class_, stats=stats
|
birthday=now, name=name, race=race, class_=class_, stats=stats
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ import random
|
|||||||
import typing as T
|
import typing as T
|
||||||
|
|
||||||
|
|
||||||
def seed(source: T.Any) -> None:
|
def seed(source: str) -> None:
|
||||||
random.seed(source)
|
random.seed(source.encode())
|
||||||
|
|
||||||
|
|
||||||
def choice(source: T.Sequence[T.Any]) -> T.Any:
|
def choice(source: T.Sequence[T.Any]) -> T.Any:
|
||||||
|
|||||||
Reference in New Issue
Block a user