Skip to content

Commit 0563ce7

Browse files
committed
Fixed names in factories.py. MatchInfo->MapInfo, MatchHistory->MapHeader
1 parent b4a6a79 commit 0563ce7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

sc2reader/factories.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,19 @@ def load_game_summary(self, summary_file, options=None, **new_options):
214214

215215
return s2gs
216216

217-
def load_match_infos(self, infos, options=None, **new_options):
217+
def load_map_infos(self, infos, options=None, **new_options):
218218
"""
219-
Loads a collection of MatchInfos. See load_resources for detailed
219+
Loads a collection of MapInfos. See load_resources for detailed
220220
parameter documentation.
221221
222-
:rtype: generator(:class:`MatchInfo`)
222+
:rtype: generator(:class:`MapInfo`)
223223
"""
224-
for s2mi in self.load_resources(infos, self.load_match_info, options=options, extensions=['.s2mi'], **new_options):
224+
for s2mi in self.load_resources(infos, self.load_map_info, options=options, extensions=['.s2mi'], **new_options):
225225
yield s2mi
226226

227-
def load_match_info(self, info_file, options=None, **new_options):
227+
def load_map_info(self, info_file, options=None, **new_options):
228228
"""
229-
Loads the specified match info using the current factory settings with
229+
Loads the specified map info using the current factory settings with
230230
the specified overrides.
231231
232232
:param info_file: An open file object or path/url to a single file
@@ -238,33 +238,33 @@ def load_match_info(self, info_file, options=None, **new_options):
238238
:param new_options: Options values to override current factory settings
239239
while loading this map.
240240
241-
:rtype: :class:`MatchInfo`
241+
:rtype: :class:`MapInfo`
242242
"""
243243
options = options or utils.merged_dict(self.options, new_options)
244244
resource, name = self.load_resource(info_file, options=options)
245-
s2mi = MatchInfo(resource, name, **options)
245+
s2mi = MapInfo(resource, name, **options)
246246

247247
# Load summary procedure here!
248248
#
249249

250250
return s2mi
251251

252-
def load_match_histories(self, histories, options=None, **new_options):
252+
def load_map_headers(self, headers, options=None, **new_options):
253253
"""
254-
Loads a collection of match history files. See load_resources for
254+
Loads a collection of map header files. See load_resources for
255255
detailed parameter documentation.
256256
257-
:rtype: generator(:class:`MatchHistory`)
257+
:rtype: generator(:class:`MapHeader`)
258258
"""
259-
for s2mh in self.load_resources(histories, self.load_match_history, options=options, extensions=['.s2mh'], **new_options):
259+
for s2mh in self.load_resources(headers, self.load_map_header, options=options, extensions=['.s2mh'], **new_options):
260260
yield s2mh
261261

262-
def load_match_history(self, history_file, options=None, **new_options):
262+
def load_map_header(self, header_file, options=None, **new_options):
263263
"""
264264
Loads the specified match info using the current factory settings with
265265
the specified overrides.
266266
267-
:param history_file: An open file object or path/url to a single file
267+
:param header_file: An open file object or path/url to a single file
268268
269269
:param None options: When options are passed directly into the options
270270
parameter the current factory settings are ignored and only the
@@ -273,12 +273,12 @@ def load_match_history(self, history_file, options=None, **new_options):
273273
:param new_options: Options values to override current factory settings
274274
while loading this map.
275275
276-
:rtype: :class:`MatchHistory`
276+
:rtype: :class:`MapHeader`
277277
"""
278278
options = options or utils.merged_dict(self.options, new_options)
279-
resource, name = self.load_resource(history_file, options=options)
279+
resource, name = self.load_resource(header_file, options=options)
280280
print name
281-
s2mh = MatchHistory(resource, name, **options)
281+
s2mh = MapHeader(resource, name, **options)
282282

283283
# Load summary procedure here!
284284
#

0 commit comments

Comments
 (0)