Skip to content

Commit bce77ad

Browse files
committed
Added type hints previously missed
1 parent 9911b64 commit bce77ad

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

shared-bindings/_pixelbuf/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//| Byteorders are configured with strings, such as "RGB" or "RGBD"."""
4242
// TODO: Pull in docs from pypixelbuf.
4343

44-
//| def colorwheel(n: int) -> Any:
44+
//| def colorwheel(n: int) -> int:
4545
//| """C implementation of the common wheel() function found in many examples.
4646
//| Returns the colorwheel RGB value as an integer value for n (usable in :py:class:`PixelBuf`, neopixel, and dotstar)."""
4747
//| ...

shared-bindings/digitalio/Direction.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
//| going."""
4747
//| ...
4848
//|
49-
//| INPUT: Any = ...
49+
//| INPUT: Direction = ...
5050
//| """Read digital data in"""
5151
//|
52-
//| OUTPUT: Any = ...
52+
//| OUTPUT: Direction = ...
5353
//| """Write digital data out"""
5454
//|
5555
const mp_obj_type_t digitalio_direction_type;

shared-bindings/digitalio/DriveMode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
//| digital values."""
3535
//| ...
3636
//|
37-
//| PUSH_PULL: Any = ...
37+
//| PUSH_PULL: DriveMode = ...
3838
//| """Output both high and low digital values"""
3939
//|
40-
//| OPEN_DRAIN: Any = ...
40+
//| OPEN_DRAIN: DriveMode = ...
4141
//| """Output low digital values but go into high z for digital high. This is
4242
//| useful for i2c and other protocols that share a digital line."""
4343
//|

shared-bindings/digitalio/Pull.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
//| digital values in."""
3535
//| ...
3636
//|
37-
//| UP: Any = ...
37+
//| UP: Pull = ...
3838
//| """When the input line isn't being driven the pull up can pull the state
3939
//| of the line high so it reads as true."""
4040
//|
41-
//| DOWN: Any = ...
41+
//| DOWN: Pull = ...
4242
//| """When the input line isn't being driven the pull down can pull the
4343
//| state of the line low so it reads as false."""
4444
//|

shared-bindings/displayio/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//|
5151

5252

53-
//| def release_displays() -> Any:
53+
//| def release_displays() -> None:
5454
//| """Releases any actively used displays so their busses and pins can be used again. This will also
5555
//| release the builtin display on boards that have one. You will need to reinitialize it yourself
5656
//| afterwards. This may take seconds to complete if an active EPaperDisplay is refreshing.

shared-bindings/microcontroller/__init__.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//| This object is the sole instance of `microcontroller.Processor`."""
5555
//|
5656

57-
//| def delay_us(delay: Any) -> Any:
57+
//| def delay_us(delay: int) -> None:
5858
//| """Dedicated delay method used for very short delays. **Do not** do long delays
5959
//| because this stops all other functions from completing. Think of this as an empty
6060
//| ``while`` loop that runs for the specified ``(delay)`` time. If you have other
@@ -72,7 +72,7 @@ STATIC mp_obj_t mcu_delay_us(mp_obj_t delay_obj) {
7272
}
7373
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_delay_us_obj, mcu_delay_us);
7474

75-
//| def disable_interrupts() -> Any:
75+
//| def disable_interrupts() -> None:
7676
//| """Disable all interrupts. Be very careful, this can stall everything."""
7777
//| ...
7878
//|
@@ -82,7 +82,7 @@ STATIC mp_obj_t mcu_disable_interrupts(void) {
8282
}
8383
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_disable_interrupts_obj, mcu_disable_interrupts);
8484

85-
//| def enable_interrupts() -> Any:
85+
//| def enable_interrupts() -> None:
8686
//| """Enable the interrupts that were enabled at the last disable."""
8787
//| ...
8888
//|
@@ -92,7 +92,7 @@ STATIC mp_obj_t mcu_enable_interrupts(void) {
9292
}
9393
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_enable_interrupts_obj, mcu_enable_interrupts);
9494

95-
//| def on_next_reset(run_mode: microcontroller.RunMode) -> Any:
95+
//| def on_next_reset(run_mode: microcontroller.RunMode) -> None:
9696
//| """Configure the run mode used the next time the microcontroller is reset but
9797
//| not powered down.
9898
//|
@@ -117,7 +117,7 @@ STATIC mp_obj_t mcu_on_next_reset(mp_obj_t run_mode_obj) {
117117
}
118118
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_on_next_reset_obj, mcu_on_next_reset);
119119

120-
//| def reset() -> Any:
120+
//| def reset() -> None:
121121
//| """Reset the microcontroller. After reset, the microcontroller will enter the
122122
//| run mode last set by `on_next_reset`.
123123
//|

shared-bindings/socket/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ STATIC const mp_obj_type_t socket_type = {
509509
.locals_dict = (mp_obj_dict_t*)&socket_locals_dict,
510510
};
511511

512-
//| def getaddrinfo(host: Any, port: Any) -> Any:
512+
//| def getaddrinfo(host: string, port: string) -> tuple:
513513
//| """Gets the address information for a hostname and port
514514
//|
515515
//| Returns the appropriate family, socket type, socket protocol and

0 commit comments

Comments
 (0)