Skip to content

Commit 65b4df5

Browse files
drvinceknightmarcharper
authored andcommitted
Add type hint to ensure type checker is happy.
1 parent ad6c40a commit 65b4df5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

axelrod/strategies/axelrod_first.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
import random
6-
from typing import Dict, List, Tuple
6+
from typing import Dict, List, Tuple, Optional
77

88
from axelrod.action import Action
99
from axelrod.player import Player
@@ -249,7 +249,7 @@ def __init__(self, alpha: float = 0.05) -> None:
249249
super().__init__()
250250
self.alpha = alpha
251251
self.opponent_is_random = False
252-
self.next_random_defection_turn = None
252+
self.next_random_defection_turn = None # type: Optional[int]
253253

254254
def strategy(self, opponent: Player) -> Action:
255255
"""This is the actual strategy"""

0 commit comments

Comments
 (0)