Skip to content

Commit 93ad966

Browse files
committed
A few more style and param corrections
1 parent f887b01 commit 93ad966

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

axelrod/_strategy_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ def __repr__(self):
112112
@Memoized
113113
def recursive_thue_morse(n):
114114
"""The recursive definition of the Thue-Morse sequence. The first few terms
115-
of the Thue-Morse sequence are:
116-
0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 . . ."""
115+
of the Thue-Morse sequence are: 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 . . ."""
117116

118117
if n == 0:
119118
return 0

axelrod/match_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def build_single_match_params(self):
126126
self.sample_length(self.prob_end), self.game, None, self.noise,
127127
{'length': float('inf'), 'game': self.game, 'noise': self.noise})
128128

129-
def sample_length(self, prob_end):
129+
def sample_length(self):
130130
"""
131131
Sample length of a game.
132132

axelrod/player.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ def clone(self):
149149

150150
def reset(self):
151151
"""Resets history.
152-
153-
When creating strategies that create new attributes then this method should be
154-
re-written (in the inherited class) and should not only reset history but also
155-
rest all other attributes.
152+
When creating strategies that create new attributes then this method
153+
should be re-written (in the inherited class) and should not only reset
154+
history but also rest all other attributes.
156155
"""
157156
self.history = []
158157
self.cooperations = 0

axelrod/plot.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,6 @@ def winplot(self, title=None):
103103
def _sd_ordering(self):
104104
return self.result_set.ranking
105105

106-
# Sort by median then max
107-
# from operator import itemgetter
108-
# diffs = self.result_set.score_diffs
109-
# to_sort = [(median(d), max(d), i) for (i, d) in enumerate(diffs)]
110-
# to_sort.sort(reverse=True, key=itemgetter(0, 1))
111-
# ordering = [x[-1] for x in to_sort]
112-
# return ordering
113-
114106
@property
115107
def _sdv_plot_dataset(self):
116108
ordering = self._sd_ordering
@@ -231,7 +223,8 @@ def stackplot(self, eco, title=None, logscale=True):
231223
for i, n in enumerate(self.result_set.ranked_names):
232224
x = -0.01
233225
y = (i + 0.5) * 1.0 / self.result_set.nplayers
234-
ax.annotate(n, xy=(x, y), xycoords=trans, clip_on=False, va='center', ha='right', fontsize=5)
226+
ax.annotate(n, xy=(x, y), xycoords=trans, clip_on=False,
227+
va='center', ha='right', fontsize=5)
235228
ticks.append(y)
236229
ax.set_yticks(ticks)
237230
ax.tick_params(direction='out')

0 commit comments

Comments
 (0)