Skip to content

Commit f3ac8eb

Browse files
committed
Run black and isort.
1 parent a2c31d1 commit f3ac8eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+246
-128
lines changed

axelrod/classifier.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
)
1515

1616
import yaml
17+
1718
from axelrod.makes_use_of import makes_use_of
1819
from axelrod.player import Player
1920

axelrod/ecosystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
population: List[int] = None,
3434
) -> None:
3535
"""Create a new ecosystem.
36-
36+
3737
Parameters
3838
----------
3939
results: ResultSet
@@ -83,7 +83,7 @@ def __init__(
8383

8484
def reproduce(self, turns: int):
8585
"""Reproduce populations according to the payoff matrix.
86-
86+
8787
Parameters
8888
----------
8989
turns: int

axelrod/fingerprint.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
from tempfile import mkstemp
44
from typing import Any, List, Union
55

6-
import axelrod as axl
76
import dask.dataframe as dd
87
import matplotlib.pyplot as plt
98
import numpy as np
109
import tqdm
10+
from mpl_toolkits.axes_grid1 import make_axes_locatable
11+
12+
import axelrod as axl
1113
from axelrod import Player
1214
from axelrod.interaction_utils import (
1315
compute_final_score_per_turn,
1416
read_interactions_from_file,
1517
)
1618
from axelrod.strategy_transformers import DualTransformer, JossAnnTransformer
17-
from mpl_toolkits.axes_grid1 import make_axes_locatable
1819

1920
Point = namedtuple("Point", "x y")
2021

axelrod/game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(
2020
self, r: Score = 3, s: Score = 0, t: Score = 5, p: Score = 1
2121
) -> None:
2222
"""Create a new game object.
23-
23+
2424
Parameters
2525
----------
2626
r: int or float

axelrod/graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
class Graph(object):
1111
"""Weighted and directed graph class.
12-
12+
1313
This class is intended for the graph associated to a Markov process,
1414
since it gives easy access to the neighbors of a particular state.
1515
1616
Vertices can be any hashable Python object.
17-
17+
1818
Initialize with a list of edges:
1919
[[node1, node2, weights], ...]
2020
Weights can be omitted for an undirected graph.
2121
2222
For efficiency, neighbors are cached in dictionaries. Undirected
2323
graphs are implemented as directed graphs in which every edge (s, t)
2424
has the opposite edge (t, s).
25-
25+
2626
Attributes
2727
----------
2828
directed: Boolean indicating whether the graph is directed
@@ -31,7 +31,7 @@ class Graph(object):
3131
all tails to their edge weights (None means no weight)
3232
in_mapping: a dictionary mapping all tails to dictionaries that map
3333
all heads to their edge weights (none means to weight)
34-
34+
3535
Properties
3636
----------
3737
vertices: the set of vertices in the graph

axelrod/interaction_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import pandas as pd
1313
import tqdm
14+
1415
from axelrod.action import Action, str_to_actions
1516

1617
from .game import Game

axelrod/load_data_.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def load_pso_tables(filename="pso_gambler.csv", directory="data"):
5656
rows = load_file(filename, directory)
5757
d = dict()
5858
for row in rows:
59-
name, a, b, c, = str(row[0]), int(row[1]), int(row[2]), int(row[3])
59+
name, a, b, c, = (
60+
str(row[0]),
61+
int(row[1]),
62+
int(row[2]),
63+
int(row[3]),
64+
)
6065
values = list(map(float, row[4:]))
6166
d[(name, int(a), int(b), int(c))] = values
6267
return d

axelrod/moran.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import matplotlib.pyplot as plt
77
import numpy as np
8+
89
from axelrod import DEFAULT_TURNS, EvolvablePlayer, Game, Player
910
from axelrod.deterministic_cache import DeterministicCache
1011
from axelrod.graph import Graph, complete_graph

axelrod/player.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing import Any, Dict
77

88
import numpy as np
9+
910
from axelrod import _module_random
1011
from axelrod.action import Action
1112
from axelrod.game import DefaultGame

axelrod/random_.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from typing import Optional
22

33
import numpy as np
4-
from axelrod.action import Action
54
from numpy.random import RandomState
65

6+
from axelrod.action import Action
7+
78
C, D = Action.C, Action.D
89

910

0 commit comments

Comments
 (0)