Skip to content

Commit 3f3fc9c

Browse files
committed
Add files to type_tests
1 parent 8d28540 commit 3f3fc9c

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

axelrod/file.pyi

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import collections
2+
import typing
3+
from typing import Any, Dict, List, Set, Tuple, Type, Union
4+
5+
Counter = ... # type: Type[collections.Counter]
6+
DeterministicCache = ... # type: Any
7+
Match = ... # type: Any
8+
np = ... # type: Any
9+
random = ... # type: module
10+
randrange = ... # type: Any
11+
12+
def fitness_proportionate_selection(scores) -> Any: ...
13+
14+
class MoranProcess(object):
15+
deterministic_cache = ... # type: Any
16+
initial_players = ... # type: Any
17+
mode = ... # type: Any
18+
mutation_rate = ... # type: Any
19+
mutation_targets = ... # type: Dict[str, list]
20+
noise = ... # type: Any
21+
players = ... # type: list
22+
populations = ... # type: List[collections.Counter]
23+
score_history = ... # type: List[list]
24+
turns = ... # type: Any
25+
winning_strategy_name = ... # type: Union[None, str]
26+
def __init__(self, players, turns = ..., noise = ..., deterministic_cache = ..., mutation_rate = ..., mode: Union[bytearray, unicode] = ..., match_class: typing.Callable = ...) -> None: ...
27+
def __iter__(self) -> MoranProcess: ...
28+
def __len__(self) -> int: ...
29+
def __next__(self) -> MoranProcess: ...
30+
def _matchup_indices(self) -> List[Tuple[int, ...]]: ...
31+
def birth(self, index = ...) -> Any: ...
32+
def death(self, index = ...) -> Any: ...
33+
def fixation_check(self) -> bool: ...
34+
def match_class(self, _1: tuple) -> Any: ...
35+
def mutate(self, index) -> Any: ...
36+
def play(self) -> Any: ...
37+
def population_distribution(self) -> collections.Counter: ...
38+
def reset(self) -> None: ...
39+
def score_all(self) -> list: ...
40+
def set_players(self) -> None: ...
41+
42+
class MoranProcessGraph(MoranProcess):
43+
dead = ... # type: Any
44+
index = ... # type: dict
45+
interaction_graph = ... # type: Any
46+
locations = ... # type: list
47+
reproduction_graph = ... # type: Any
48+
def __init__(self, players, interaction_graph, reproduction_graph = ..., turns = ..., noise = ..., deterministic_cache = ..., mutation_rate = ..., mode = ..., match_class = ...) -> None: ...
49+
def _matchup_indices(self) -> Set[tuple]: ...
50+
def birth(self, index = ...) -> Any: ...
51+
def death(self, index = ...) -> Any: ...

type_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/grumpy.py
2727
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/handshake.py
2828
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/inverse.py
2929
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/mathematicalconstants.py
30+
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/mindcontrol.py
31+
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/mindreader.py
32+
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/mutual.py
33+
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/negation.py

0 commit comments

Comments
 (0)