Skip to content

Commit c0bf9a9

Browse files
authored
Merge pull request #112 from cclauss/patch-2
CircleCI: Look for typos with codespell
2 parents 01fd025 + 5a526f8 commit c0bf9a9

File tree

17 files changed

+33
-32
lines changed

17 files changed

+33
-32
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
- image: circleci/python:3.8
1616
steps:
1717
- checkout
18-
- run: sudo pip install flake8 black
18+
- run: sudo pip install black codespell flake8
1919
- run: python --version ; pip --version ; pwd ; ls -l
20+
- run: codespell -L queenland,uint
2021
# stop the build if there are Python syntax errors or undefined names
2122
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
2223
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Changed Stuff (non-backwards compatible!):
159159
--------------------
160160

161161
* Fixes several game event parsing issues for older replays.
162-
* Propperly maps ability ids for armory vehicle & ship armor upgrades.
162+
* Properly maps ability ids for armory vehicle & ship armor upgrades.
163163
* Uses the US depot for SEA battle.net depot dependencies.
164164
* ``PlayerStatEvent.food_used`` and ``food_made`` are now properly divided by 4096
165165
* ``AbilityEvent.flags`` are now processed into a dictionary mapping flag name to True/False (``AbilityEvent.flag``)

docs/source/articles/whatsinareplay.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The last file provides a record of important events from the game.
3535

3636
* replay.tracker.events - Records important game events and game state updates.
3737

38-
This file was introduced in 2.0.4 and is unncessary for the Starcraft II to reproduce the game. Instead, it records interesting game events and game state for community developers to use when analyzing replays.
38+
This file was introduced in 2.0.4 and is unnecessary for the Starcraft II to reproduce the game. Instead, it records interesting game events and game state for community developers to use when analyzing replays.
3939

4040

4141
What isn't in a replay?

docs/source/tutorials/prettyprinter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Many of the replay attributes are nested data structures which are generally all
9393

9494
Each of these nested structures can be found either on its own reference page or lumped together with the other minor structures on the Misc Structures page.
9595

96-
So now all we need to do is build the ouput using the available replay attributes. Lets start with the header portion. We'll use a block string formatting method that makes this clean and easy:
96+
So now all we need to do is build the output using the available replay attributes. Lets start with the header portion. We'll use a block string formatting method that makes this clean and easy:
9797

9898
::
9999

@@ -199,7 +199,7 @@ With this in mind, lets make a slight change to our main function to support any
199199
Any time that you start dealing with directories or collections of files you run into dangers with recursion and annoyances of tedium. sc2reader provides options to mitigate these concerns.
200200

201201
* directory: Default ''. The directory string when supplied, becomes the base of all the file paths sent into sc2reader and can save you the hassle of fully qualifying your file paths each time.
202-
* depth: Default -1. When handling directory inputs, sc2reader searches the directory recursively until all .SC2Replay files have been loaded. By setting the maxium depth value this behavior can be mitigated.
202+
* depth: Default -1. When handling directory inputs, sc2reader searches the directory recursively until all .SC2Replay files have been loaded. By setting the maximum depth value this behavior can be mitigated.
203203
* exclude: Default []. When recursing directories you can choose to exclude directories from the file search by directory name (not full path).
204204
* followlinks: Default false. When recursing directories, enables or disables the follow symlinks behavior.
205205

examples/sc2autosave.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
--------------------
3838
3939
The --rename option allows you to specify a renaming format string. The string
40-
is constructed the pythonic (3.0) way with {:field} indicating the substition
40+
is constructed the pythonic (3.0) way with {:field} indicating the substitution
4141
of a field. The forward slash (/) is a special character here which terminates
4242
a folder name and allows for organization into subdirectories. All other string
4343
characters form the template into which the fields are inserted.
@@ -138,7 +138,7 @@
138138
files every SECONDS seconds.
139139
--rename FORMAT
140140
:map - Inserts the map name.
141-
:date - Inserts a string formated datetime object using --date-format.
141+
:date - Inserts a string formatted datetime object using --date-format.
142142
:length - Inserts a string formatted time object using --length-format.
143143
:teams - Inserts a comma separated player list. Teams are separated
144144
with a ' vs ' string. Format the player with --player-format.
@@ -602,7 +602,7 @@ def main():
602602
try:
603603
run(parser.parse_args())
604604
except KeyboardInterrupt:
605-
print("\n\nScript Interupted. Process Aborting")
605+
print("\n\nScript Interrupted. Process Aborting")
606606

607607

608608
if __name__ == "__main__":

sc2reader/data/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(self, unit_id):
8484

8585
#: The unique in-game id for this unit. The id can sometimes be zero because
8686
#: TargetUnitCommandEvents will create a new unit with id zero when a unit
87-
#: behind the fog of war is targetted.
87+
#: behind the fog of war is targeted.
8888
self.id = unit_id
8989

9090
#: A reference to the unit type this unit is current in.
@@ -301,11 +301,11 @@ class Build(object):
301301
"""
302302
:param build_id: The build number identifying this dataset.
303303
304-
The datapack for a particualr group of builds. Maps internal integer ids
304+
The datapack for a particular group of builds. Maps internal integer ids
305305
to :class:`Unit` and :class:`Ability` types. Also contains builder methods
306306
for creating new units and changing their types.
307307
308-
All build data is valid for standard games only. For arcade maps milage
308+
All build data is valid for standard games only. For arcade maps mileage
309309
may vary.
310310
"""
311311

sc2reader/decoders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ByteDecoder(object):
2020
Used to unpack parse byte aligned files.
2121
"""
2222

23-
#: The Bytes object used internaly for reading from the
23+
#: The Bytes object used internally for reading from the
2424
#: decoder contents. cStringIO is faster than managing our
2525
#: own string access in python. For PyPy installations a
2626
#: managed string implementation might be faster.

sc2reader/engine/plugins/creeptracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(self, replay):
117117
self.creep_spread_image_by_minute = dict()
118118
## This list contains all the active cgus in every time frame
119119
self.creep_gen_units = dict()
120-
## Thist list corresponds to creep_gen_units storing the time of each CGU
120+
## This list corresponds to creep_gen_units storing the time of each CGU
121121
self.creep_gen_units_times = dict()
122122
## convert all possible cgu radii into a sets of coordinates centred around the origin,
123123
## in order to use this with the CGUs, the centre point will be
@@ -168,7 +168,7 @@ def radius_to_map_positions(self, radius):
168168
## this function converts all radius into map coordinates
169169
## centred around the origin that the creep can exist
170170
## the cgu_radius_to_map_position function will simply
171-
## substract every coordinate with the centre point of the tumour
171+
## subtract every coordinate with the centre point of the tumour
172172
output_coordinates = list()
173173
# Sample a square area using the radius
174174
for x in range(-radius, radius):

sc2reader/engine/plugins/selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SelectionTracker(object):
2121
control_group_9 = selection[9]
2222
active_selection = selection[10]
2323
24-
# TODO: list a few error inducing sitations
24+
# TODO: list a few error inducing situations
2525
"""
2626

2727
name = "SelectionTracker"

sc2reader/engine/plugins/supply.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def remove_from_units_alive(self, event, replay):
8787
)
8888

8989
def handleInitGame(self, event, replay):
90-
## This dictionary contains te supply of every unit
90+
## This dictionary contains the supply of every unit
9191
self.unit_name_to_supply = {
9292
# Zerg
9393
"Drone": (1, 17),

0 commit comments

Comments
 (0)