Skip to content

Commit dffaf57

Browse files
authored
Merge pull request #143 from StoicLoofah/mark_170
mark release version 1.7.0
2 parents c2a5407 + b4ae14d commit dffaf57

File tree

10 files changed

+29
-20
lines changed

10 files changed

+29
-20
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
CHANGELOG
22
============
33

4+
1.7.0 - May 17, 2021
5+
--------------------
6+
* Add DOI to the README #128
7+
* Add various missing attributes for co-op replays #129
8+
* Add support for python 3.8, 3.9 #132 #136
9+
* Fix owner on an event with no unit #133
10+
* Add support for ResourceTradeEvent #135
11+
* Fix depot URL template #139
12+
413
1.6.0 - July 30, 2020
514
---------------------
615
* Add support for protocol 80949 (StarCraft 5.0) #122

sc2reader/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"""
2121
from __future__ import absolute_import, print_function, unicode_literals, division
2222

23-
__version__ = "1.6.0"
23+
__version__ = "1.7.0"
2424

2525
import os
2626
import sys

sc2reader/data/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,42 +151,42 @@ def title(self):
151151

152152
@property
153153
def type(self):
154-
""" The internal type id of the current unit type of this unit. None if no type is assigned"""
154+
"""The internal type id of the current unit type of this unit. None if no type is assigned"""
155155
return self._type_class.id if self._type_class else None
156156

157157
@property
158158
def race(self):
159-
""" The race of this unit. One of Terran, Protoss, Zerg, Neutral, or None"""
159+
"""The race of this unit. One of Terran, Protoss, Zerg, Neutral, or None"""
160160
return self._type_class.race if self._type_class else None
161161

162162
@property
163163
def minerals(self):
164-
""" The mineral cost of the unit. None if no type is assigned"""
164+
"""The mineral cost of the unit. None if no type is assigned"""
165165
return self._type_class.minerals if self._type_class else None
166166

167167
@property
168168
def vespene(self):
169-
""" The vespene cost of the unit. None if no type is assigned"""
169+
"""The vespene cost of the unit. None if no type is assigned"""
170170
return self._type_class.vespene if self._type_class else None
171171

172172
@property
173173
def supply(self):
174-
""" The supply used by this unit. Negative for supply providers. None if no type is assigned """
174+
"""The supply used by this unit. Negative for supply providers. None if no type is assigned"""
175175
return self._type_class.supply if self._type_class else None
176176

177177
@property
178178
def is_worker(self):
179-
""" Boolean flagging units as worker units. SCV, MULE, Drone, Probe """
179+
"""Boolean flagging units as worker units. SCV, MULE, Drone, Probe"""
180180
return self._type_class.is_worker if self._type_class else False
181181

182182
@property
183183
def is_building(self):
184-
""" Boolean flagging units as buildings. """
184+
"""Boolean flagging units as buildings."""
185185
return self._type_class.is_building if self._type_class else False
186186

187187
@property
188188
def is_army(self):
189-
""" Boolean flagging units as army units. """
189+
"""Boolean flagging units as army units."""
190190
return self._type_class.is_army if self._type_class else False
191191

192192
def __str__(self):
@@ -221,7 +221,7 @@ def __repr__(self):
221221

222222

223223
class UnitType(object):
224-
""" Represents an in game unit type """
224+
"""Represents an in game unit type"""
225225

226226
def __init__(
227227
self,
@@ -272,7 +272,7 @@ def __init__(
272272

273273

274274
class Ability(object):
275-
""" Represents an in-game ability """
275+
"""Represents an in-game ability"""
276276

277277
def __init__(
278278
self, id, name=None, title=None, is_build=False, build_time=0, build_unit=None

sc2reader/events/tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __str__(self):
3636

3737

3838
class PlayerSetupEvent(TrackerEvent):
39-
""" Sent during game setup to help us organize players better """
39+
"""Sent during game setup to help us organize players better"""
4040

4141
def __init__(self, frames, data, build):
4242
super(PlayerSetupEvent, self).__init__(frames)

sc2reader/factories/plugins/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def deselect(self, mode, data):
8989
return True
9090

9191
elif mode == "Mask":
92-
""" Deselect objects according to deselect mask """
92+
"""Deselect objects according to deselect mask"""
9393
mask = data
9494
if len(mask) < size:
9595
# pad to the right
@@ -105,15 +105,15 @@ def deselect(self, mode, data):
105105
return len(mask) <= size
106106

107107
elif mode == "OneIndices":
108-
""" Deselect objects according to indexes """
108+
"""Deselect objects according to indexes"""
109109
clean_data = list(filter(lambda i: i < size, data))
110110
self.objects = [
111111
self.objects[i] for i in range(len(self.objects)) if i not in clean_data
112112
]
113113
return len(clean_data) == len(data)
114114

115115
elif mode == "ZeroIndices":
116-
""" Deselect objects according to indexes """
116+
"""Deselect objects according to indexes"""
117117
clean_data = list(filter(lambda i: i < size, data))
118118
self.objects = [self.objects[i] for i in clean_data]
119119
return len(clean_data) == len(data)

sc2reader/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def __init__(self, x, y, xy_list=None):
473473
self.values = y
474474

475475
def as_points(self):
476-
""" Get the graph as a list of (x, y) tuples """
476+
"""Get the graph as a list of (x, y) tuples"""
477477
return list(zip(self.times, self.values))
478478

479479
def __str__(self):

sc2reader/scripts/sc2printer.py

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

1212

1313
def printReplay(filepath, arguments):
14-
""" Prints summary information about SC2 replay file """
14+
"""Prints summary information about SC2 replay file"""
1515
try:
1616
replay = sc2reader.load_replay(filepath, debug=True)
1717

sc2reader/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, bytes):
3838

3939
@property
4040
def url(self):
41-
""" Returns url of the depot file. """
41+
"""Returns url of the depot file."""
4242
return self.url_template.format(self.server, self.hash, self.type)
4343

4444
def __hash__(self):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
setuptools.setup(
55
license="MIT",
66
name="sc2reader",
7-
version="1.6.0",
7+
version="1.7.0",
88
keywords=["starcraft 2", "sc2", "replay", "parser"],
99
description="Utility for parsing Starcraft II replay files",
1010
long_description=open("README.rst").read() + "\n\n" + open("CHANGELOG.rst").read(),

test_replays/test_replays.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def test_cn_replays(self):
321321
self.assertEqual(replay.expansion, "WoL")
322322

323323
def test_unit_types(self):
324-
""" sc2reader#136 regression test """
324+
"""sc2reader#136 regression test"""
325325
replay = sc2reader.load_replay("test_replays/2.0.8.25604/issue136.SC2Replay")
326326
hellion_times = [
327327
u.started_at for u in replay.players[0].units if u.name == "Hellion"

0 commit comments

Comments
 (0)