1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00

core: fix docs typos

This commit is contained in:
Tomas Susanka 2019-08-21 15:12:21 +02:00
parent 4323b0ac2a
commit c9a78d7bcb
3 changed files with 11 additions and 11 deletions

View File

@ -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:
@ -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):

View File

@ -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

View File

@ -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(