Skip to content

Commit bc7a052

Browse files
committed
fix some doc-comments
1 parent 1eaa51e commit bc7a052

File tree

12 files changed

+25
-19
lines changed

12 files changed

+25
-19
lines changed

ports/espressif/bindings/espulp/ULP.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "py/objproperty.h"
1414

1515
//| class ULP:
16-
//| def __init__(self, arch: Architecture = Architecture.FSM):
16+
//| def __init__(self, arch: Architecture = Architecture.FSM) -> None:
1717
//| """The ultra-low-power processor.
1818
//|
1919
//| Raises an exception if another ULP has been instantiated. This

shared-bindings/bitmapfilter/__init__.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//| mul: float | None = None,
2020
//| add: float = 0,
2121
//| mask: displayio.Bitmap | None = None,
22-
//| threshold=False,
22+
//| threshold: bool = False,
2323
//| offset: int = 0,
2424
//| invert: bool = False,
2525
//| ) -> displayio.Bitmap:
@@ -406,7 +406,11 @@ static mp_obj_t bitmapfilter_mix(size_t n_args, const mp_obj_t *pos_args, mp_map
406406
}
407407
MP_DEFINE_CONST_FUN_OBJ_KW(bitmapfilter_mix_obj, 0, bitmapfilter_mix);
408408

409-
//| def solarize(bitmap, threshold: float = 0.5, mask: displayio.Bitmap | None = None):
409+
//| def solarize(
410+
//| bitmap: displayio.Bitmap,
411+
//| threshold: float = 0.5,
412+
//| mask: displayio.Bitmap | None = None,
413+
//| ) -> displayio.Bitmap:
410414
//| """Create a "solarization" effect on an image
411415
//|
412416
//| This filter inverts pixels with brightness values above ``threshold``, while leaving

shared-bindings/codeop/__init__.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ static const char *get_arg_str(mp_obj_t arg, qstr name) {
1717
//| """Utilities to compile possibly incomplete Python source code."""
1818
//|
1919

20-
//| def compile_command(source: str, filename: str = "<input>", symbol: str = "single"):
20+
//| def compile_command(
21+
//| source: str, filename: str = "<input>", symbol: str = "single"
22+
//| ) -> "code": # NOTE(elpekenin): this type does not seem to exist
2123
//| """Compile a command and determine whether it is incomplete
2224
//|
2325
//| The 'completeness' determination is slightly different than in standard Python

shared-bindings/dotclockframebuffer/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//| mosi_bit: int,
3131
//| clk_bit: int,
3232
//| reset_bit: Optional[int],
33-
//| ):
33+
//| ) -> None:
3434
//| """Send a displayio-style initialization sequence over an I2C I/O expander
3535
//|
3636
//| This function is highly generic in order to support various I/O expanders.

shared-bindings/floppyio/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//| buffer: WriteableBuffer,
2424
//| data: digitalio.DigitalInOut,
2525
//| index: digitalio.DigitalInOut,
26-
//| index_wait=0.220,
26+
//| index_wait: float = 0.220,
2727
//| ) -> int:
2828
//| """Read flux transition information into the buffer.
2929
//|

shared-bindings/memorymap/AddressRange.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//| """
5555
//|
5656

57-
//| def __init__(self, *, start, length) -> None:
57+
//| def __init__(self, *, start: int, length: int) -> None:
5858
//| """Constructs an address range starting at ``start`` and ending at
5959
//| ``start + length``. An exception will be raised if any of the
6060
//| addresses are invalid or protected."""

shared-bindings/rotaryio/IncrementalEncoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
//| class IncrementalEncoder:
1818
//| """IncrementalEncoder determines the relative rotational position based on two series of pulses.
19-
//| It assumes that the encoder's common pin(s) are connected to ground,and enables pull-ups on
20-
//| pin_a and pin_b."""
19+
//| It assumes that the encoder's common pin(s) are connected to ground,and enables pull-ups on
20+
//| pin_a and pin_b."""
2121
//|
2222
//| def __init__(
2323
//| self, pin_a: microcontroller.Pin, pin_b: microcontroller.Pin, divisor: int = 4

shared-bindings/synthio/LFO.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ static const uint16_t triangle[] = {0, 32767, 0, -32767};
7474
//| scale: BlockInput = 1.0,
7575
//| offset: BlockInput = 0.0,
7676
//| phase_offset: BlockInput = 0.0,
77-
//| once=False,
78-
//| interpolate=True
79-
//| ):
80-
//| pass
77+
//| once: bool = False,
78+
//| interpolate: bool = True,
79+
//| ) -> None:
80+
//| """Initialize an instance of the class."""
8181
static const mp_arg_t lfo_properties[] = {
8282
{ MP_QSTR_waveform, MP_ARG_OBJ, {.u_obj = MP_ROM_NONE } },
8383
{ MP_QSTR_rate, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
@@ -268,7 +268,7 @@ MP_PROPERTY_GETTER(synthio_lfo_value_obj,
268268

269269

270270
//|
271-
//| def retrigger(self):
271+
//| def retrigger(self) -> None:
272272
//| """Reset the LFO's internal index to the start of the waveform. Most useful when it its `once` property is `True`."""
273273
//|
274274
static mp_obj_t synthio_lfo_retrigger(mp_obj_t self_in) {

shared-bindings/synthio/Math.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ MAKE_ENUM_TYPE(synthio, MathOperation, synthio_math_operation,
133133
//| a: BlockInput,
134134
//| b: BlockInput = 0.0,
135135
//| c: BlockInput = 1.0,
136-
//| ):
137-
//| pass
136+
//| ) -> None:
137+
//| """Initialize an instance of the class."""
138138
static const mp_arg_t math_properties[] = {
139139
{ MP_QSTR_operation, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = NULL } },
140140
{ MP_QSTR_a, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = NULL } },

shared-bindings/synthio/Synthesizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_release_obj, synthio_synthe
106106
//| self,
107107
//| release: NoteOrNoteSequence = (),
108108
//| press: NoteOrNoteSequence = (),
109-
//| retrigger=LFOOrLFOSequence,
109+
//| retrigger: LFOOrLFOSequence = (),
110110
//| ) -> None:
111111
//| """Start notes, stop them, and/or re-trigger some LFOs.
112112
//|

0 commit comments

Comments
 (0)