Skip to content

Commit 65e2fe4

Browse files
committed
fix stub problems; touch up doc
1 parent f96475c commit 65e2fe4

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

shared-bindings/_typing/__init__.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from typing import Union
44

5+
import alarm
6+
import alarm.pin
7+
import alarm.time
58
import array
69
import audiocore
710
import audiomixer
@@ -61,5 +64,5 @@ Alarm = Union[
6164
- `alarm.pin.PinAlarm`
6265
- `alarm.time.TimeAlarm`
6366
64-
You can use these alarms to wake from light or deep sleep.
67+
You can use these alarms to wake up from light or deep sleep.
6568
"""

shared-bindings/alarm/time/TimeAlarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mp_obj_t MP_WEAK rtc_get_time_source_time(void) {
4343
//| class TimeAlarm:
4444
//| """Trigger an alarm when the specified time is reached."""
4545
//|
46-
//| def __init__(self, monotonic_time: Optional[Float] = None, epoch_time: Optional[int] = None) -> None:
46+
//| def __init__(self, monotonic_time: Optional[float] = None, epoch_time: Optional[int] = None) -> None:
4747
//| """Create an alarm that will be triggered when `time.monotonic()` would equal
4848
//| ``monotonic_time``, or when `time.time()` would equal ``epoch_time``.
4949
//| Only one of the two arguments can be given.

shared-bindings/microcontroller/__init__.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_reset_obj, mcu_reset);
147147
//| This object is the sole instance of `watchdog.WatchDogTimer` when available or ``None`` otherwise."""
148148
//|
149149

150-
151-
//| """:mod:`microcontroller.pin` --- Microcontroller pin names
152-
//| --------------------------------------------------------
153-
//|
154-
//| .. module:: microcontroller.pin
155-
//| :synopsis: Microcontroller pin names
156-
//|
157-
//| References to pins as named by the microcontroller"""
158-
//|
159150
const mp_obj_module_t mcu_pin_module = {
160151
.base = { &mp_type_module },
161152
.globals = (mp_obj_dict_t*)&mcu_pin_globals,

tools/extract_pyi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
IMPORTS_IGNORE = frozenset({'int', 'float', 'bool', 'str', 'bytes', 'tuple', 'list', 'set', 'dict', 'bytearray', 'slice', 'file', 'buffer', 'range', 'array', 'struct_time'})
2020
IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload', 'Type'})
2121
IMPORTS_TYPES = frozenset({'TracebackType'})
22-
CPY_TYPING = frozenset({'ReadableBuffer', 'WriteableBuffer', 'AudioSample', 'FrameBuffer'})
22+
CPY_TYPING = frozenset({'ReadableBuffer', 'WriteableBuffer', 'AudioSample', 'FrameBuffer', 'Alarm'})
2323

2424

2525
def is_typed(node, allow_any=False):

0 commit comments

Comments
 (0)