From f48b2234e9effe06d97ddac0cca525fa81cd872f Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 19 Feb 2023 13:15:53 +0100 Subject: fix: Fix typing --- README.md | 1 + main.py | 4 ++-- src/strategy.py | 9 ++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3afa448 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +- https://www.microsoft.com/en-us/research/uploads/prod/2018/03/trueskill2.pdf diff --git a/main.py b/main.py index 1d93332..23d61fc 100644 --- a/main.py +++ b/main.py @@ -167,8 +167,8 @@ games: list[Game] = [ Player.Thomas: 50, Player.Emma: 62, Player.Theo: 62, - } - ) + }, + ), ] for game in games: diff --git a/src/strategy.py b/src/strategy.py index 6713299..01b69ad 100644 --- a/src/strategy.py +++ b/src/strategy.py @@ -1,7 +1,10 @@ -from typing import Protocol +from __future__ import annotations -from src.game import Game -from src.player import Player +from typing import TYPE_CHECKING, Protocol + +if TYPE_CHECKING: + from src.game import Game + from src.player import Player class GameEloChangeStrategy(Protocol): -- cgit v1.3