Skip to content

Commit b1a7347

Browse files
authored
Merge pull request #792 from eclipse/add-typos-check
Add spell checking using typos
2 parents 3f71356 + 02fc370 commit b1a7347

7 files changed

Lines changed: 16 additions & 11 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ repos:
2121
# - id: mixed-line-ending
2222
# - id: trailing-whitespace
2323

24-
#- repo: https://github.com/codespell-project/codespell
25-
# rev: v2.2.6
26-
# hooks:
27-
# - id: codespell # See pyproject.toml for args
28-
# additional_dependencies:
29-
# - tomli
24+
- repo: https://github.com/crate-ci/typos
25+
rev: v1.17.0
26+
hooks:
27+
- id: typos
3028

3129
- repo: https://github.com/charliermarsh/ruff-pre-commit
3230
rev: v0.1.9

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Please read the [Eclipse Foundation policy on accepting contributions via Git](h
2828
cherry-picked to the release branch.
2929

3030
The only changes that goes directly to the release branch (``1.4``,
31-
``1.5``, ...) are bug fixe that does not apply to ``master`` (e.g. because
31+
``1.5``, ...) are bug fixes that does not apply to ``master`` (e.g. because
3232
there are fixed on master by a refactoring, or any other huge change we do
3333
not want to cherry-pick to the release branch).
3434
4. Create a new branch from the latest ```master``` branch

examples/client_rpc_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# This correlates the outbound request with the returned reply
3434
corr_id = b"1"
3535

36-
# This is sent in the message callback when we get the respone
36+
# This is sent in the message callback when we get the response
3737
reply = None
3838

3939
# The MQTTv5 callback takes the additional 'props' parameter.

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,10 @@ exclude_also = [
117117
"raise AssertionError",
118118
"raise NotImplementedError",
119119
]
120+
121+
[tool.typos.default.extend-words]
122+
Mosquitto = "Mosquitto"
123+
124+
[tool.typos.type.sh.extend-words]
125+
# gen.sh use the openssl option pass(word) in
126+
passin = "passin"

src/paho/mqtt/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def __init__(self, client_id="", clean_session=None, userdata=None,
507507
Normally, when a message is received, the library automatically
508508
acknowledges after on_message callback returns. manual_ack=True allows the application to
509509
acknowledge receipt after it has completed processing of a message
510-
using a the ack() method. This addresses vulnerabilty to message loss
510+
using a the ack() method. This addresses vulnerability to message loss
511511
if applications fails while processing a message, or while it pending
512512
locally.
513513

src/paho/mqtt/properties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class VariableByteIntegers: # Variable Byte Integer
9797
def encode(x):
9898
"""
9999
Convert an integer 0 <= x <= 268435455 into multi-byte format.
100-
Returns the buffer convered from the integer.
100+
Returns the buffer converted from the integer.
101101
"""
102102
if not 0 <= x <= 268435455:
103103
raise ValueError(f"Value {x!r} must be in range 0-268435455")

src/paho/mqtt/subscribe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def simple(topics, qos=0, msg_count=1, retained=True, hostname="localhost",
251251
when it disconnects. If False, the client is a persistent
252252
client and subscription information and queued messages
253253
will be retained when the client disconnects.
254-
Defaults to True. If protocoll is MQTTv50, clean_session
254+
Defaults to True. If protocol is MQTTv50, clean_session
255255
is ignored.
256256
257257
proxy_args: a dictionary that will be given to the client.

0 commit comments

Comments
 (0)