core: fix docs typos

ripple-full
Tomas Susanka 5 years ago
parent 4323b0ac2a
commit c9a78d7bcb

@ -88,7 +88,7 @@ def finalize(task: Task, value: Any) -> None:
def close(task: Task) -> None:
"""
Deschedule and unblock a task, close it so it can release all resources, and
Unschedule and unblock a task, close it so it can release all resources, and
call its finalizer.
"""
for iface in _paused:
@ -101,7 +101,7 @@ def close(task: Task) -> None:
def run() -> None:
"""
Loop forever, stepping through scheduled tasks and awaiting I/O events
inbetween. Use `schedule` first to add a coroutine to the task queue.
in between. Use `schedule` first to add a coroutine to the task queue.
Tasks yield back to the scheduler on any I/O, usually by calling `await` on
a `Syscall`.
"""
@ -150,19 +150,19 @@ def clear() -> None:
def _step(task: Task, value: Any) -> None:
"""
Step through the task by sending `value` to `Task`. This can result in either:
Step through the task by sending value to it. This can result in either:
1. The task raises an exception:
a) StopIteration
- The Task is completed and we call finalize to finish it.
- The Task is completed and we call finalize() to finish it.
b) Exception
- An error occurred. We still need to call finalize.
- An error occurred. We still need to call finalize().
2. Task does not raise exception and returns either:
a) Syscall
- Syscall.handle is called.
- Syscall.handle() is called.
b) None
- The Task is simply scheduled to continue.
c) Something else
- That should not happen - error.
- This should not happen - error.
"""
try:
if isinstance(value, BaseException):

@ -252,7 +252,7 @@ class Layout(Component):
async def __iter__(self) -> ResultValue:
"""
Run the layout and wait until it completes. Returns the result value.
Usually not overriden.
Usually not overridden.
"""
value = None
try:
@ -282,7 +282,7 @@ class Layout(Component):
run this layout. Tasks are executed in parallel. When one of them
returns, the others are closed and `create_tasks` is called again.
Usually overriden to add another task to the list."""
Usually overridden to add another tasks to the list."""
return self.handle_input(), self.handle_rendering()
def handle_input(self) -> loop.Task: # type: ignore

@ -11,8 +11,8 @@ iface_wire = io.WebUSB(
ep_out=0x01,
)
# as the iface_vcp inteface needs 3 endpoints, we cannot use it simultaneously
# with the iface_webauthn inteface.
# as the iface_vcp interface can have at most 3 endpoints, we cannot use it simultaneously
# with the iface_webauthn interface.
if __debug__:
# interface used for debug messages with trezor wire protocol
iface_debug = io.WebUSB(

Loading…
Cancel
Save