Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed Oct 4, 2023
1 parent 615e087 commit 6135d21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/example_interrupt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Interrupt(Exception):

async def test_stop_doing_that():
"""
This example shows how we can use task_interrup()
This example shows how we can use task_interrupt()
to immediately send an exception to a task in a certain
state, and know how it has got the interrupt delivered by
the time we have awaited.
Expand Down
6 changes: 3 additions & 3 deletions examples/example_resp.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_generator() -> None:
"""
Test our generator based parser for Redis RESP strings.
"""
# construct a resp string constisting of an array of arrays of ints
# construct a resp string consisting of an array of arrays of ints
resp = b"*2\r\n*3\r\n:1\r\n:2\r\n:3\r\n*2\r\n:4\r\n:5\r\n"
# split it up into chunks of two bytes
chunks = [resp[i : i + 2] for i in range(0, len(resp), 2)]
Expand Down Expand Up @@ -115,7 +115,7 @@ async def parse_resp_mon(

async def test_monitor() -> None:
"""Test our monitor based parser for Redis RESP strings."""
# construct a resp string constisting of an array of arrays of ints
# construct a resp string consisting of an array of arrays of ints
resp = b"*2\r\n*3\r\n:1\r\n:2\r\n:3\r\n*2\r\n:4\r\n:5\r\n"
# split it up into chunks of two bytes
chunks = [resp[i : i + 2] for i in range(0, len(resp), 2)]
Expand All @@ -137,7 +137,7 @@ def test_monitor_sync() -> None:
"""Test our monitor based parser for Redis RESP strings.
from synchronous code.
"""
# construct a resp string constisting of an array of arrays of ints
# construct a resp string consisting of an array of arrays of ints
resp = b"*2\r\n*3\r\n:1\r\n:2\r\n:3\r\n*2\r\n:4\r\n:5\r\n"
# split it up into chunks of two bytes
chunks = [resp[i : i + 2] for i in range(0, len(resp), 2)]
Expand Down
10 changes: 5 additions & 5 deletions src/asynkit/coroutine.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ def _start(self) -> Tuple[Any, Optional[BaseException]]:

def __await__(self) -> Generator[Any, Any, T_co]:
"""
Resume the excecution of the started coroutine. CoroStart is an
Resume the execution of the started coroutine. CoroStart is an
_awaitable_.
"""
if self.start_result is None:
# exhausted coroutine, triger the "cannot reuse" error
# exhausted coroutine, trigger the "cannot reuse" error
self.coro.send(None)
assert False, "unreachable"

Expand Down Expand Up @@ -280,7 +280,7 @@ def throw(

def close(self) -> None:
"""
Close the coroutine. It must immediatly exit.
Close the coroutine. It must immediately exit.
"""
self.start_result = None
self.coro.close()
Expand Down Expand Up @@ -500,7 +500,7 @@ def wrapper(self: S) -> Iterator[T]:


def await_sync(coro: Coroutine[Any, Any, T]) -> T:
"""Runs a corouting synchronlously. If the coroutine blocks, a
"""Runs a coroutine synchronously. If the coroutine blocks, a
SynchronousError is raised.
"""
start = CoroStart[T](coro)
Expand Down Expand Up @@ -546,7 +546,7 @@ async def helper(*args: P.args, **kwargs: P.kwargs) -> T:


def aiter_sync(async_iterable: AsyncIterable[T]) -> Generator[T, None, None]:
"""Iterate synchronously over an async itarable"""
"""Iterate synchronously over an async iterable"""
ai = async_iterable.__aiter__()

# a helper ensures that we have a coroutine, not just an Awaitable
Expand Down
4 changes: 2 additions & 2 deletions src/asynkit/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def try_await(
sentinel: Any = None,
) -> Any:
"""
A convenence function to call `aawait()`, returning a sentinel if
A convenience function to call `aawait()`, returning a sentinel if
an OOBData exception was raised.
The `sentinel` value defaults to None. The OOBData
exception is discarded.
Expand All @@ -233,7 +233,7 @@ async def try_await(
class BoundMonitor(Generic[T]):
"""
An awaitable helper class which can be awaited to invoke a
`await Monitior.aawait(coroutine)`
`await Monitor.aawait(coroutine)`
"""

def __init__(self, monitor: Monitor[T], coro: Coroutine[Any, Any, T]) -> None:
Expand Down

0 comments on commit 6135d21

Please sign in to comment.