Skip to content

Commit

Permalink
Fix feedback from Rob.
Browse files Browse the repository at this point in the history
Also spotted a send vs send_bytes error in radio.
  • Loading branch information
microbit-matt-hillsdon committed Apr 28, 2022
1 parent 73f348c commit 0fe5efd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion typeshed/stdlib/math.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def cos(x: float) -> float:
def degrees(x: float) -> float:
"""Convert radians to degrees.
Example: ``math.cos(2 * math.pi)``
Example: ``math.degrees(2 * math.pi)``
:param x: A value in radians
:return: The value converted to degrees"""
Expand Down
2 changes: 1 addition & 1 deletion typeshed/stdlib/microbit/accelerometer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def current_gesture() -> str:
def is_gesture(name: str) -> bool:
"""Check if the named gesture is currently active.
Example: ``accelerometer.is_gesture("shake")``
Example: ``accelerometer.is_gesture('shake')``
MicroPython understands the following gesture names: ``"up"``, ``"down"``,
``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``,
Expand Down
2 changes: 1 addition & 1 deletion typeshed/stdlib/microbit/display.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def scroll(
) -> None:
"""Scrolls a number or text on the display.
Example: ``display.scroll('micro:bit)``
Example: ``display.scroll('micro:bit')``
:param text: The string to scroll. If ``text`` is an integer or float it is first converted to a string using ``str()``.
:param delay: The ``delay`` parameter controls how fast the text is scrolling.
Expand Down
4 changes: 2 additions & 2 deletions typeshed/stdlib/radio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def reset() -> None:
def send_bytes(message: bytes) -> None:
"""Sends a message containing bytes.
Example: ``radio.send(b'hello')``
Example: ``radio.send_bytes(b'hello')``
:param message: The bytes to send.
"""
Expand Down Expand Up @@ -121,7 +121,7 @@ def receive_bytes_into(buffer: WriteableBuffer) -> Optional[int]:
def send(message: str) -> None:
"""Sends a message string.
Example: ``radio.send("hello")``
Example: ``radio.send('hello')``
This is the equivalent of ``radio.send_bytes(bytes(message, 'utf8'))`` but with ``b'\x01\x00\x01'``
prepended to the front (to make it compatible with other platforms that target the micro:bit).
Expand Down
2 changes: 1 addition & 1 deletion typeshed/stdlib/speech.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def sing(
) -> None:
"""Sing phonemes.
Example: ``speech.pronounce(' /HEHLOW WERLD')``
Example: ``speech.sing(' /HEHLOW WERLD')``
:param phonemes: The string of words to sing.
:param pitch: A number representing the pitch of the voice
Expand Down

0 comments on commit 0fe5efd

Please sign in to comment.