Skip to content

Commit

Permalink
codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
schwehr committed Sep 24, 2021
1 parent 064505f commit 4a13ed8
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 18 deletions.
10 changes: 5 additions & 5 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Changelog and release history for libais
* Cleanup nmea_messages.py
* Use a logger in python
* Factor out ais_bitset.cpp
* Stop calling ParseNmeaPayload mulitple times per message
* Stop calling ParseNmeaPayload multiple times per message
* Stay far away from -ffast-math
* Fixes for CMake builds

Expand Down Expand Up @@ -99,11 +99,11 @@ Changelog and release history for libais
* Begin cleanup of test_libais.cpp
* Almost all decoders require pad bits now
* linted - lots of formatting changes
* Start implmenting Msg 17 GNSS differential corrections
* Start implementing Msg 17 GNSS differential corrections
* Convert FIX to TODO and put (schwehr) after each to assign them to myself.
* remove bool casting of bitset[offset]
* Implemented 8 1 26
* Clean up c++ logical oprators. Do not use and, or, and not
* Clean up c++ logical operators. Do not use and, or, and not
* Message 24 needed pad. Fixed
* Removed print()
* remove almost all cout/cerr that were not in print()
Expand All @@ -116,8 +116,8 @@ Changelog and release history for libais

* ais.decode now requires the pad bits in python
* Added RIS 8_200_{10,23,24,40,55}
* Implmented the rest of Circ 236 BBM
* Implmented all Circ 289 messages except ABM route and BBM env sensors
* Implemented the rest of Circ 236 BBM
* Implemented all Circ 289 messages except ABM route and BBM env sensors
* Implemented AIS messages 6, 9, 10, 12, 15-17, 20-22, 23, 25-27. Still payload work to do.
* Imported rolker's CMakeList.txt

Expand Down
2 changes: 1 addition & 1 deletion ais/compatibility/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import warnings

warnings.warn(
"The compatability module is deprecated and will be removed in 1.0",
"The compatibility module is deprecated and will be removed in 1.0",
FutureWarning,
stacklevel=2
)
6 changes: 3 additions & 3 deletions ais/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

def open(name, mode='r', **kwargs):
"""Open a file containing NMEA and instantiate an instance of `NmeaFile()`.
Lke Python's `open()`, set the `mode` parameter to 'r' for normal reading or
Like Python's `open()`, set the `mode` parameter to 'r' for normal reading or
or 'rU' for opening the file in universal newline mode.
Args:
Expand Down Expand Up @@ -136,8 +136,8 @@ def name(self):
return self._fobj.name

def close(self):
"""Close the file-like object from which we are reading and dump whats left
in the queue."""
"""Close the file-like object from which we are reading and dump what is
left in the queue."""
return self._fobj.close()

def __iter__(self):
Expand Down
2 changes: 1 addition & 1 deletion ais/stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __str__(self):
return '%(description)s for %(timestamp)s: %(line_num)s: %(line)s, parts: %(parts)s' % self.kw

class OnlyMessageEndError(StreamError):
description = 'Do not have the preceeding packets for'
description = 'Do not have the preceding packets for'

def __str__(self):
return '%(description)s for %(bufferSlot)s:\n%(line)s\n' % self.kw
Expand Down
2 changes: 1 addition & 1 deletion ais/stream/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def checksumStr(data):
"""Take a NMEA 0183 string and compute the checksum.
@param data: NMEA message. Leading ?/! and training checksum are optional
@type data: str
@return: hexidecimal value
@return: hexadecimal value
@rtype: str
Checksum is calculated by xor'ing everything between ? or ! and the *
Expand Down
2 changes: 1 addition & 1 deletion src/libais/ais_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@ ais21_to_pydict(const char *nmea_payload, const size_t pad) {
return dict;
}

// 22 - 'F' - Channel mangement
// 22 - 'F' - Channel management
PyObject*
ais22_to_pydict(const char *nmea_payload, const size_t pad) {
assert(nmea_payload);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ais8_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void ValidateAis8_1_11(
EXPECT_EQ(extended_water_level, msg->extended_water_level);
}

// Internation Maritime Organization (IMO) Circ 289 meteorology and hydrography.
// International Maritime Organization (IMO) Circ 289 meteorology and hydrography.
TEST(Ais8_1_11Test, DecodeAnything) {
// clang-format off
// !AIVDM,1,1,,A,8@2<HV@0BkLN:0frqMPaQPtBRRIrwwejwwwwwwwwwwwwwwwwwwwwwwwwwt0,2*34 // NOLINT
Expand Down
2 changes: 1 addition & 1 deletion utils/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This directory contains utilities and scripts that are usefull when
This directory contains utilities and scripts that are useful when
developing libais, but that are not generic enough to be put in the
bin directory to be installed by the pypi package.
5 changes: 1 addition & 4 deletions utils/benthos_validate.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/usr/bin/env python


"""
Validator to ensure libais can produce Benthos's expected input
"""


import json
import os
import unittest
import sys


# In order to ease test maintenance as outputs and inputs change the data structure below contains a test for every
# field, a value that will pass the test, and a value that will fail the test. All information is pulled from GPSD
# (http://catb.org/gpsd/AIVDM.html) and assumes two things:
Expand Down Expand Up @@ -195,7 +192,7 @@
'bad': 2 * 2
},
'dte': {
'test': lambda x: isinstance(x, int) and not isinstance(x, bool) and x in (0, 1), # TODO: Switch to a more Pythonic bool if this is actually bolean and not a status
'test': lambda x: isinstance(x, int) and not isinstance(x, bool) and x in (0, 1), # TODO: Switch to a more Pythonic bool if this is actually boolean and not a status
'good': 0,
'bad': 8
},
Expand Down

0 comments on commit 4a13ed8

Please sign in to comment.