Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spell checking using typos #792

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading