diff --git a/pyproject.toml b/pyproject.toml index 9f5156cd40..18038a9bb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -164,11 +164,11 @@ testpaths = [ ] [tool.codespell] -count = true quiet-level = 3 # if you've got a short variable name that's getting flagged, add it here -ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn" -builtin = "clear,rare,informal,usage,code,names,en-GB_to_en-US" +ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn,ws,uint,grey,deque,stdio,amin,BA,LITE,atEnd,UIs,errorString,arange,FocusIn,od,tim,relA,hist,copyable" +builtin = "clear,rare,informal,code,names,en-GB_to_en-US" +skip = "./third_party/*, ./tinygrad/*, ./tinygrad_repo/*, ./msgq/*, ./panda/*, ./opendbc/*, ./opendbc_repo/*, ./rednose/*, ./rednose_repo/*, ./teleoprtc/*, ./teleoprtc_repo/*, ./selfdrive/ui/translations/*.ts, uv.lock, *.onnx, ./cereal/gen/*, */c_generated_code/*" [tool.mypy] python_version = "3.11" diff --git a/selfdrive/car/ford/fordcan.py b/selfdrive/car/ford/fordcan.py index 46d09ec22d..5bb3d0570f 100644 --- a/selfdrive/car/ford/fordcan.py +++ b/selfdrive/car/ford/fordcan.py @@ -38,7 +38,7 @@ def create_lka_msg(packer, CAN: CanBus): """ Creates an empty CAN message for the Ford LKA Command. - This command can apply "Lane Keeping Aid" manoeuvres, which are subject to the PSCM lockout. + This command can apply "Lane Keeping Aid" maneuvers, which are subject to the PSCM lockout. Frequency is 33Hz. """ @@ -51,7 +51,7 @@ def create_lat_ctl_msg(packer, CAN: CanBus, lat_active: bool, path_offset: float """ Creates a CAN message for the Ford TJA/LCA Command. - This command can apply "Lane Centering" manoeuvres: continuous lane centering for traffic jam assist and highway + This command can apply "Lane Centering" maneuvers: continuous lane centering for traffic jam assist and highway driving. It is not subject to the PSCM lockout. Ford lane centering command uses a third order polynomial to describe the road centerline. The polynomial is defined diff --git a/system/athena/tests/test_athenad.py b/system/athena/tests/test_athenad.py index 413255b587..a4dcbef67a 100644 --- a/system/athena/tests/test_athenad.py +++ b/system/athena/tests/test_athenad.py @@ -342,7 +342,7 @@ class TestAthenadMethods: athenad.upload_queue.put_nowait(item1) athenad.upload_queue.put_nowait(item2) - # Ensure cancelled items are not persisted + # Ensure canceled items are not persisted athenad.cancelled_uploads.add(item2.id) # serialize item diff --git a/system/athena/tests/test_athenad_ping.py b/system/athena/tests/test_athenad_ping.py index 73fe7783af..025df7d614 100644 --- a/system/athena/tests/test_athenad_ping.py +++ b/system/athena/tests/test_athenad_ping.py @@ -65,7 +65,7 @@ class TestAthenadPing: mock_create_connection.assert_called_once() mock_create_connection.reset_mock() - # check normal behaviour, server pings on connection + # check normal behavior, server pings on connection with subtests.test("Wi-Fi: receives ping"), Timeout(70, "no ping received"): while not self._received_ping(): time.sleep(0.1) diff --git a/system/qcomgpsd/structs.py b/system/qcomgpsd/structs.py index bde4e0049c..f97704bbee 100644 --- a/system/qcomgpsd/structs.py +++ b/system/qcomgpsd/structs.py @@ -192,8 +192,8 @@ gps_measurement_report_sv = """ int16_t latency; // Age of the measurement in msecs (+ve meas Meas precedes ref time) uint8_t predetect_interval; // Pre-Detection (Coherent) Interval (msecs) uint16_t postdetections; // Num Post-Detections (uints of PreInts - uint32_t unfiltered_measurement_integral; // Range of 0 thru (WEEK_MSECS-1) [msecs] - float unfiltered_measurement_fraction; // Range of 0 thru 0.99999 [msecs] + uint32_t unfiltered_measurement_integral; // Range of 0 through (WEEK_MSECS-1) [msecs] + float unfiltered_measurement_fraction; // Range of 0 through 0.99999 [msecs] float unfiltered_time_uncertainty; // Time uncertainty (msec) float unfiltered_speed; // Speed estimate (meters/sec) float unfiltered_speed_uncertainty; // Speed uncertainty estimate (meters/sec) diff --git a/system/ubloxd/ublox_msg.cc b/system/ubloxd/ublox_msg.cc index 26b33a1e32..16b8766cf0 100644 --- a/system/ubloxd/ublox_msg.cc +++ b/system/ubloxd/ublox_msg.cc @@ -174,7 +174,7 @@ kj::Array UbloxMsgParser::parse_gps_ephemeris(ubx_t::rxm_sfrbx_t *m int subframe_id = subframe.how()->subframe_id(); if (subframe_id > 3 || subframe_id < 1) { - // dont parse almanac subframes + // don't parse almanac subframes return kj::Array(); } gps_subframes[msg->sv_id()][subframe_id] = subframe_data; @@ -286,7 +286,7 @@ kj::Array UbloxMsgParser::parse_glonass_ephemeris(ubx_t::rxm_sfrbx_ glonass_t gl_string(&stream); int string_number = gl_string.string_number(); if (string_number < 1 || string_number > 5 || gl_string.idle_chip()) { - // dont parse non immediate data, idle_chip == 0 + // don't parse non immediate data, idle_chip == 0 return kj::Array(); } diff --git a/tools/cabana/binaryview.cc b/tools/cabana/binaryview.cc index c72ebf9d35..2950a67ff2 100644 --- a/tools/cabana/binaryview.cc +++ b/tools/cabana/binaryview.cc @@ -436,7 +436,7 @@ void BinaryItemDelegate::drawSignalCell(QPainter *painter, const QStyleOptionVie auto item = (const BinaryViewModel::Item *)index.internalPointer(); QColor color = sig->color; color.setAlpha(item->bg_color.alpha()); - // Mixing the signal colour with the Base background color to fade it + // Mixing the signal color with the Base background color to fade it painter->fillRect(rc, option.palette.color(QPalette::Base)); painter->fillRect(rc, color); diff --git a/tools/replay/can_replay.py b/tools/replay/can_replay.py index 9b76edde10..ff27b50067 100755 --- a/tools/replay/can_replay.py +++ b/tools/replay/can_replay.py @@ -44,10 +44,10 @@ def send_thread(j: PandaJungle, flock): i = (rk.frame*DT_CTRL) % (IGN_ON + IGN_OFF) < IGN_ON j.set_ignition(i) - snd = CAN_MSGS[rk.frame % len(CAN_MSGS)] - snd = list(filter(lambda x: x[-1] <= 2, snd)) + send = CAN_MSGS[rk.frame % len(CAN_MSGS)] + send = list(filter(lambda x: x[-1] <= 2, send)) try: - j.can_send_many(snd) + j.can_send_many(send) except usb1.USBErrorTimeout: # timeout is fine, just means the CAN TX buffer is full pass diff --git a/tools/replay/tests/test_replay.cc b/tools/replay/tests/test_replay.cc index 6c005f1bd4..3e5bfdf984 100644 --- a/tools/replay/tests/test_replay.cc +++ b/tools/replay/tests/test_replay.cc @@ -163,7 +163,7 @@ TEST_CASE("seek_to") { Replay replay(DEMO_ROUTE, {}, {}, nullptr, REPLAY_FLAG_NO_VIPC); QObject::connect(&replay, &Replay::seekedTo, [&](double sec) { - INFO("seek to " << seek_to << "s seeked to" << sec); + INFO("seek to " << seek_to << "s sought to" << sec); REQUIRE(sec >= seek_to); loop.quit(); });