Skip to content

Commit

Permalink
Merge pull request #792 from eclipse/add-typos-check
Browse files Browse the repository at this point in the history
Add spell checking using typos
  • Loading branch information
PierreF authored Jan 7, 2024
2 parents 3f71356 + 02fc370 commit b1a7347
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ repos:
# - id: mixed-line-ending
# - id: trailing-whitespace

#- repo: https://github.com/codespell-project/codespell
# rev: v2.2.6
# hooks:
# - id: codespell # See pyproject.toml for args
# additional_dependencies:
# - tomli
- repo: https://github.com/crate-ci/typos
rev: v1.17.0
hooks:
- id: typos

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.9
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Please read the [Eclipse Foundation policy on accepting contributions via Git](h
cherry-picked to the release branch.

The only changes that goes directly to the release branch (``1.4``,
``1.5``, ...) are bug fixe that does not apply to ``master`` (e.g. because
``1.5``, ...) are bug fixes that does not apply to ``master`` (e.g. because
there are fixed on master by a refactoring, or any other huge change we do
not want to cherry-pick to the release branch).
4. Create a new branch from the latest ```master``` branch
Expand Down
2 changes: 1 addition & 1 deletion examples/client_rpc_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# This correlates the outbound request with the returned reply
corr_id = b"1"

# This is sent in the message callback when we get the respone
# This is sent in the message callback when we get the response
reply = None

# The MQTTv5 callback takes the additional 'props' parameter.
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,10 @@ exclude_also = [
"raise AssertionError",
"raise NotImplementedError",
]

[tool.typos.default.extend-words]
Mosquitto = "Mosquitto"

[tool.typos.type.sh.extend-words]
# gen.sh use the openssl option pass(word) in
passin = "passin"
2 changes: 1 addition & 1 deletion src/paho/mqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def __init__(self, client_id="", clean_session=None, userdata=None,
Normally, when a message is received, the library automatically
acknowledges after on_message callback returns. manual_ack=True allows the application to
acknowledge receipt after it has completed processing of a message
using a the ack() method. This addresses vulnerabilty to message loss
using a the ack() method. This addresses vulnerability to message loss
if applications fails while processing a message, or while it pending
locally.
Expand Down
2 changes: 1 addition & 1 deletion src/paho/mqtt/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class VariableByteIntegers: # Variable Byte Integer
def encode(x):
"""
Convert an integer 0 <= x <= 268435455 into multi-byte format.
Returns the buffer convered from the integer.
Returns the buffer converted from the integer.
"""
if not 0 <= x <= 268435455:
raise ValueError(f"Value {x!r} must be in range 0-268435455")
Expand Down
2 changes: 1 addition & 1 deletion src/paho/mqtt/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def simple(topics, qos=0, msg_count=1, retained=True, hostname="localhost",
when it disconnects. If False, the client is a persistent
client and subscription information and queued messages
will be retained when the client disconnects.
Defaults to True. If protocoll is MQTTv50, clean_session
Defaults to True. If protocol is MQTTv50, clean_session
is ignored.
proxy_args: a dictionary that will be given to the client.
Expand Down

0 comments on commit b1a7347

Please sign in to comment.