Skip to content

Commit

Permalink
Fixed typos discovered by codespell (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jan 5, 2025
1 parent 74022ec commit 6707d01
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,22 @@ repos:
args: [ "--fix=lf" ]
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.8.6
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contain the changes from v4.5.1.
As Python 3.8 support was dropped in v4.6.0, this interim release was created to bring a
regression fix to Python 3.8, and adds a few other fixes also present in v4.6.1.

- Fixed acquring a lock twice in the same task on asyncio hanging instead of raising a
- Fixed acquiring a lock twice in the same task on asyncio hanging instead of raising a
``RuntimeError`` (`#798 <https://github.com/agronholm/anyio/issues/798>`_)
- Fixed an async fixture's ``self`` being different than the test's ``self`` in
class-based tests (`#633 <https://github.com/agronholm/anyio/issues/633>`_)
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ markers = [
"network: marks tests as requiring Internet access",
]

[tool.codespell]
ignore-words-list = "asend,daa,hel"

[tool.coverage.run]
source = ["anyio"]
relative_files = true
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_core/_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class Path:
* :meth:`~pathlib.Path.from_uri` (available on Python 3.13 or later)
* :meth:`~pathlib.Path.full_match` (available on Python 3.13 or later)
* :meth:`~pathlib.Path.is_junction` (available on Python 3.12 or later)
* :meth:`~pathlib.Path.match` (the ``case_sensitive`` paramater is only available on
* :meth:`~pathlib.Path.match` (the ``case_sensitive`` parameter is only available on
Python 3.13 or later)
* :meth:`~pathlib.Path.move` (available on Python 3.14 or later)
* :meth:`~pathlib.Path.move_into` (available on Python 3.14 or later)
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/abc/_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def receive(self, max_bytes: int = 65536) -> bytes:
"""
Receive at most ``max_bytes`` bytes from the peer.
.. note:: Implementors of this interface should not return an empty
.. note:: Implementers of this interface should not return an empty
:class:`bytes` object, and users should ignore them.
:param max_bytes: maximum number of bytes to receive
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/from_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _spawn_task_from_thread(
"""
Spawn a new task using the given callable.
Implementors must ensure that the future is resolved when the task finishes.
Implementers must ensure that the future is resolved when the task finishes.
:param func: a callable
:param args: positional arguments to be passed to the callable
Expand Down
4 changes: 2 additions & 2 deletions tests/test_synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async def test_cancel_after_release(self) -> None:
task1 = loop.create_task(lock.acquire(), name="task1")
await asyncio.sleep(0)

# Trigger the aqcuiring task to be rescheduled, but also cancel it right away
# Trigger the acquiring task to be rescheduled, but also cancel it right away
lock.release()
task1.cancel()
statistics = lock.statistics()
Expand Down Expand Up @@ -598,7 +598,7 @@ async def test_cancel_after_release(self) -> None:
task1 = loop.create_task(semaphore.acquire())
await asyncio.sleep(0)

# Trigger the aqcuiring task to be rescheduled, but also cancel it right away
# Trigger the acquiring task to be rescheduled, but also cancel it right away
semaphore.release()
task1.cancel()
assert semaphore.value == 0
Expand Down

0 comments on commit 6707d01

Please sign in to comment.