Skip to content

Commit 1fbf6c9

Browse files
authored
Merge pull request #79 from timgates42/bugfix_typos
docs: Fix a few typos
2 parents b03a810 + df451ad commit 1fbf6c9

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

antd/ant.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def wait_and_retry_policy(error):
204204

205205
# matcher define the strategry to determine
206206
# if an incoming message from ANT device sould
207-
# udpate the status of a running command.
207+
# update the status of a running command.
208208

209209
def same_channel_or_network_matcher(request, reply):
210210
return (
@@ -244,7 +244,7 @@ def send_data_matcher(request, reply):
244244
and reply.msg_id == 1
245245
and reply.msg_code in (EVENT_TX, EVENT_TRANSFER_TX_COMPLETED, EVENT_TRANSFER_TX_FAILED)))
246246

247-
# validators define stragegy for determining
247+
# validators define strategy for determining
248248
# if a give reply from ANT should raise an
249249
# error.
250250

@@ -354,7 +354,7 @@ def __str__(self):
354354
# Synthetic Commands
355355
UnimplementedCommand = message(None, "UNIMPLEMENTED_COMMAND", None, None, ["msg_id", "msg_contents"])
356356

357-
# hack, capabilites may be 4 (AP1) or 6 (AP2) bytes
357+
# hack, capabilities may be 4 (AP1) or 6 (AP2) bytes
358358
class Capabilities(message(DIR_IN, "CAPABILITIES", 0x54, "BBBB", ["max_channels", "max_networks", "standard_opts", "advanced_opts1"])):
359359

360360
@classmethod
@@ -371,7 +371,7 @@ def unpack_args(cls, packed_args):
371371
class ReadData(RequestMessage):
372372
"""
373373
A phony command which is pushed to request data from client.
374-
This command will remain runnning as long as the channel is
374+
This command will remain running as long as the channel is
375375
in a state where read is valid, and raise error if channel
376376
transitions to a state where read is impossible. Its kind-of
377377
an ugly hack so that channel status causes exceptions in read.
@@ -638,7 +638,7 @@ def _send(self, cmd, timeout=1, retry=0):
638638
# HACK, need to clean this up. not all devices support sending
639639
# a response message for ResetSystem, so don't bother waiting for it
640640
if not isinstance(cmd, ResetSystem):
641-
# set expiration and event on command. Once self.runnning_cmd
641+
# set expiration and event on command. Once self.running_cmd
642642
# is set access to this command from this thread is invalid
643643
# until event object is set.
644644
cmd.expiration = time.time() + timeout if timeout > 0 else None

antd/antfs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def search(self, search_timeout=60, device_id=None, include_unpaired_devices=Fal
288288
if beacon.device_state != Beacon.STATE_LINK:
289289
_log.warning("Device busy, not ready for link. device_number=0x%04x state=%d.",
290290
tracking_device_number, beacon.device_state)
291-
# are we looking for a sepcific device
291+
# are we looking for a specific device
292292
if device_id is not None:
293293
if device_id == tracking_device_id:
294294
# the device exactly matches the one we're looking for
@@ -303,7 +303,7 @@ def search(self, search_timeout=60, device_id=None, include_unpaired_devices=Fal
303303
continue
304304
elif not include_unpaired_devices and tracking_device_id is None:
305305
# requested not to return unpared devices
306-
# but the one linked is unkown.
306+
# but the one linked is unknown.
307307
# FIXME add device to AP2 filter and contiue search
308308
_log.debug("Found device, but paring not enabled. device_number=0x%04x", tracking_device_number)
309309
continue
@@ -348,7 +348,7 @@ def auth(self, pair=True, timeout=60):
348348
with the device we are currenly linked. Not
349349
valid unless device is in link status.
350350
If a client key is known, transport will be
351-
openned without user interaction. If key is unkown
351+
openned without user interaction. If key is unknown
352352
we will attempt to pair with device (which must
353353
be acknowledged by human on GPS device.)
354354
If paising is not enabled Auth is impossible.
@@ -381,7 +381,7 @@ def auth(self, pair=True, timeout=60):
381381
_log.warning("Device pairing failed. Removing key from db. Try re-pairing.")
382382
self.known_client_keys.delete_device(client_id)
383383
elif pair:
384-
_log.debug("Device unkown, requesting pairing.")
384+
_log.debug("Device unknown, requesting pairing.")
385385
auth_cmd = Auth(Auth.OP_PAIR, ANTFS_HOST_NAME)
386386
self.channel.write(auth_cmd.pack())
387387
while True:
@@ -395,7 +395,7 @@ def auth(self, pair=True, timeout=60):
395395
else:
396396
_log.warning("Device pairing failed. Request rejected?")
397397
else:
398-
_log.warning("Device 0x08%x has data but pairing is disabled and key is unkown.", client_id)
398+
_log.warning("Device 0x08%x has data but pairing is disabled and key is unknown.", client_id)
399399
#confirm the ANT-FS channel is open
400400
self.beacon = Beacon.unpack(self.channel.recv_broadcast(0))
401401
assert self.beacon.device_state == Beacon.STATE_TRANSPORT

antd/cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def read(file=None):
5555
write_default_config(file)
5656
read = _cfg.read([file])
5757
if read:
58-
# config file read sucessfuelly, setup logger
58+
# config file read successfully, setup logger
5959
_log.setLevel(logging.WARNING)
6060
init_loggers()
6161
# check for version mismatch

antd/garmin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
types in specification. Currently this class only implementes
3434
the necessary protocols and datatypes to dynamically discover
3535
device capaibilties and save runs. The spec was last updated
36-
in 2006, so some datatypes include undocumented/unkown fields.
36+
in 2006, so some datatypes include undocumented/unknown fields.
3737
"""
3838

3939
import logging
@@ -475,7 +475,7 @@ def execute(self):
475475
"""
476476
A generator or array which contains either a tuple
477477
representing a command which should be executed
478-
or a protocol (who's execute shoudl be deletaged to.
478+
or a protocol (who's execute should be deletaged to.
479479
"""
480480
return []
481481

@@ -683,7 +683,7 @@ def _parse(self, type, arg_name=None):
683683
"""
684684
Invoke a composite data type to parse
685685
from start of this instance's unparsed text.
686-
If arg_name is provided, reulst will be
686+
If arg_name is provided, result will be
687687
assigned as attribute of this instance.
688688
"""
689689
data = type(self.unparsed)
@@ -925,7 +925,7 @@ def __init__(self, data):
925925

926926
class DeviceNotSupportedError(Exception):
927927
"""
928-
Raised device capabilites lack capabilites
928+
Raised device capabilities lack capabilities
929929
to complete request.
930930
"""
931931

antd/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def downloader():
7878
while failed_count <= antd.cfg.get_retry():
7979
try:
8080
_log.info("Searching for ANT devices.")
81-
# in daemon mode we do not attempt to pair with unkown devices
81+
# in daemon mode we do not attempt to pair with unknown devices
8282
# (it requires gps watch to wake up and would drain battery of
8383
# any un-paired devices in range.)
8484
beacon = host.search(include_unpaired_devices=not args.daemon,

antd/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def data_available(self, device_sn, format, files):
4747
Notification that data is available, this could
4848
be raw packet data from device, or higher level
4949
data generated by other plugins, e.g. TCX.
50-
Return: files which were sucessfullly processed.
50+
Return: files which were successfully processed.
5151
"""
5252
pass
5353

0 commit comments

Comments
 (0)