Skip to content

Commit 6707d01

Browse files
authored
Fixed typos discovered by codespell (#855)
1 parent 74022ec commit 6707d01

File tree

7 files changed

+18
-8
lines changed

7 files changed

+18
-8
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,22 @@ repos:
2121
args: [ "--fix=lf" ]
2222
- id: trailing-whitespace
2323

24+
- repo: https://github.com/codespell-project/codespell
25+
rev: v2.3.0
26+
hooks:
27+
- id: codespell
28+
additional_dependencies:
29+
- tomli
30+
2431
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.8.4
32+
rev: v0.8.6
2633
hooks:
2734
- id: ruff
2835
args: [--fix, --show-fixes]
2936
- id: ruff-format
3037

3138
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: v1.14.0
39+
rev: v1.14.1
3340
hooks:
3441
- id: mypy
3542
additional_dependencies:

docs/versionhistory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ contain the changes from v4.5.1.
8383
As Python 3.8 support was dropped in v4.6.0, this interim release was created to bring a
8484
regression fix to Python 3.8, and adds a few other fixes also present in v4.6.1.
8585

86-
- Fixed acquring a lock twice in the same task on asyncio hanging instead of raising a
86+
- Fixed acquiring a lock twice in the same task on asyncio hanging instead of raising a
8787
``RuntimeError`` (`#798 <https://github.com/agronholm/anyio/issues/798>`_)
8888
- Fixed an async fixture's ``self`` being different than the test's ``self`` in
8989
class-based tests (`#633 <https://github.com/agronholm/anyio/issues/633>`_)

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ markers = [
112112
"network: marks tests as requiring Internet access",
113113
]
114114

115+
[tool.codespell]
116+
ignore-words-list = "asend,daa,hel"
117+
115118
[tool.coverage.run]
116119
source = ["anyio"]
117120
relative_files = true

src/anyio/_core/_fileio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class Path:
231231
* :meth:`~pathlib.Path.from_uri` (available on Python 3.13 or later)
232232
* :meth:`~pathlib.Path.full_match` (available on Python 3.13 or later)
233233
* :meth:`~pathlib.Path.is_junction` (available on Python 3.12 or later)
234-
* :meth:`~pathlib.Path.match` (the ``case_sensitive`` paramater is only available on
234+
* :meth:`~pathlib.Path.match` (the ``case_sensitive`` parameter is only available on
235235
Python 3.13 or later)
236236
* :meth:`~pathlib.Path.move` (available on Python 3.14 or later)
237237
* :meth:`~pathlib.Path.move_into` (available on Python 3.14 or later)

src/anyio/abc/_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def receive(self, max_bytes: int = 65536) -> bytes:
137137
"""
138138
Receive at most ``max_bytes`` bytes from the peer.
139139
140-
.. note:: Implementors of this interface should not return an empty
140+
.. note:: Implementers of this interface should not return an empty
141141
:class:`bytes` object, and users should ignore them.
142142
143143
:param max_bytes: maximum number of bytes to receive

src/anyio/from_thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def _spawn_task_from_thread(
248248
"""
249249
Spawn a new task using the given callable.
250250
251-
Implementors must ensure that the future is resolved when the task finishes.
251+
Implementers must ensure that the future is resolved when the task finishes.
252252
253253
:param func: a callable
254254
:param args: positional arguments to be passed to the callable

tests/test_synchronization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ async def test_cancel_after_release(self) -> None:
197197
task1 = loop.create_task(lock.acquire(), name="task1")
198198
await asyncio.sleep(0)
199199

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

601-
# Trigger the aqcuiring task to be rescheduled, but also cancel it right away
601+
# Trigger the acquiring task to be rescheduled, but also cancel it right away
602602
semaphore.release()
603603
task1.cancel()
604604
assert semaphore.value == 0

0 commit comments

Comments
 (0)