summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authordherrada <dylan.herrada@adafruit.com>2020-07-03 16:03:19 -0400
committerdherrada <dylan.herrada@adafruit.com>2020-07-03 16:03:19 -0400
commitbce77adecdbfd36006dbc97a50b67d05720c8135 (patch)
tree31d1e1e80a04ddcd6c6261df9eb780d2ade650f8 /shared-bindings
parent9911b64fa13442f552a9968cdf40d926b98de6f8 (diff)
Added type hints previously missed
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/_pixelbuf/__init__.c2
-rw-r--r--shared-bindings/digitalio/Direction.c4
-rw-r--r--shared-bindings/digitalio/DriveMode.c4
-rw-r--r--shared-bindings/digitalio/Pull.c4
-rw-r--r--shared-bindings/displayio/__init__.c2
-rw-r--r--shared-bindings/microcontroller/__init__.c10
-rw-r--r--shared-bindings/socket/__init__.c2
7 files changed, 14 insertions, 14 deletions
diff --git a/shared-bindings/_pixelbuf/__init__.c b/shared-bindings/_pixelbuf/__init__.c
index bfd479fde..6038fdfdc 100644
--- a/shared-bindings/_pixelbuf/__init__.c
+++ b/shared-bindings/_pixelbuf/__init__.c
@@ -41,7 +41,7 @@
//| Byteorders are configured with strings, such as "RGB" or "RGBD"."""
// TODO: Pull in docs from pypixelbuf.
-//| def colorwheel(n: int) -> Any:
+//| def colorwheel(n: int) -> int:
//| """C implementation of the common wheel() function found in many examples.
//| Returns the colorwheel RGB value as an integer value for n (usable in :py:class:`PixelBuf`, neopixel, and dotstar)."""
//| ...
diff --git a/shared-bindings/digitalio/Direction.c b/shared-bindings/digitalio/Direction.c
index 3798b3fa7..173ebfb2b 100644
--- a/shared-bindings/digitalio/Direction.c
+++ b/shared-bindings/digitalio/Direction.c
@@ -46,10 +46,10 @@
//| going."""
//| ...
//|
-//| INPUT: Any = ...
+//| INPUT: Direction = ...
//| """Read digital data in"""
//|
-//| OUTPUT: Any = ...
+//| OUTPUT: Direction = ...
//| """Write digital data out"""
//|
const mp_obj_type_t digitalio_direction_type;
diff --git a/shared-bindings/digitalio/DriveMode.c b/shared-bindings/digitalio/DriveMode.c
index 208143a2f..2f22029b0 100644
--- a/shared-bindings/digitalio/DriveMode.c
+++ b/shared-bindings/digitalio/DriveMode.c
@@ -34,10 +34,10 @@
//| digital values."""
//| ...
//|
-//| PUSH_PULL: Any = ...
+//| PUSH_PULL: DriveMode = ...
//| """Output both high and low digital values"""
//|
-//| OPEN_DRAIN: Any = ...
+//| OPEN_DRAIN: DriveMode = ...
//| """Output low digital values but go into high z for digital high. This is
//| useful for i2c and other protocols that share a digital line."""
//|
diff --git a/shared-bindings/digitalio/Pull.c b/shared-bindings/digitalio/Pull.c
index 9656811c8..87e2a8f1e 100644
--- a/shared-bindings/digitalio/Pull.c
+++ b/shared-bindings/digitalio/Pull.c
@@ -34,11 +34,11 @@
//| digital values in."""
//| ...
//|
-//| UP: Any = ...
+//| UP: Pull = ...
//| """When the input line isn't being driven the pull up can pull the state
//| of the line high so it reads as true."""
//|
-//| DOWN: Any = ...
+//| DOWN: Pull = ...
//| """When the input line isn't being driven the pull down can pull the
//| state of the line low so it reads as false."""
//|
diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c
index b791336b5..16d068e2e 100644
--- a/shared-bindings/displayio/__init__.c
+++ b/shared-bindings/displayio/__init__.c
@@ -50,7 +50,7 @@
//|
-//| def release_displays() -> Any:
+//| def release_displays() -> None:
//| """Releases any actively used displays so their busses and pins can be used again. This will also
//| release the builtin display on boards that have one. You will need to reinitialize it yourself
//| afterwards. This may take seconds to complete if an active EPaperDisplay is refreshing.
diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c
index 88fe9c224..6d556cdd7 100644
--- a/shared-bindings/microcontroller/__init__.c
+++ b/shared-bindings/microcontroller/__init__.c
@@ -54,7 +54,7 @@
//| This object is the sole instance of `microcontroller.Processor`."""
//|
-//| def delay_us(delay: Any) -> Any:
+//| def delay_us(delay: int) -> None:
//| """Dedicated delay method used for very short delays. **Do not** do long delays
//| because this stops all other functions from completing. Think of this as an empty
//| ``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) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_delay_us_obj, mcu_delay_us);
-//| def disable_interrupts() -> Any:
+//| def disable_interrupts() -> None:
//| """Disable all interrupts. Be very careful, this can stall everything."""
//| ...
//|
@@ -82,7 +82,7 @@ STATIC mp_obj_t mcu_disable_interrupts(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_disable_interrupts_obj, mcu_disable_interrupts);
-//| def enable_interrupts() -> Any:
+//| def enable_interrupts() -> None:
//| """Enable the interrupts that were enabled at the last disable."""
//| ...
//|
@@ -92,7 +92,7 @@ STATIC mp_obj_t mcu_enable_interrupts(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_enable_interrupts_obj, mcu_enable_interrupts);
-//| def on_next_reset(run_mode: microcontroller.RunMode) -> Any:
+//| def on_next_reset(run_mode: microcontroller.RunMode) -> None:
//| """Configure the run mode used the next time the microcontroller is reset but
//| not powered down.
//|
@@ -117,7 +117,7 @@ STATIC mp_obj_t mcu_on_next_reset(mp_obj_t run_mode_obj) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_on_next_reset_obj, mcu_on_next_reset);
-//| def reset() -> Any:
+//| def reset() -> None:
//| """Reset the microcontroller. After reset, the microcontroller will enter the
//| run mode last set by `on_next_reset`.
//|
diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c
index 985104d55..64b1a538d 100644
--- a/shared-bindings/socket/__init__.c
+++ b/shared-bindings/socket/__init__.c
@@ -509,7 +509,7 @@ STATIC const mp_obj_type_t socket_type = {
.locals_dict = (mp_obj_dict_t*)&socket_locals_dict,
};
-//| def getaddrinfo(host: Any, port: Any) -> Any:
+//| def getaddrinfo(host: string, port: string) -> tuple:
//| """Gets the address information for a hostname and port
//|
//| Returns the appropriate family, socket type, socket protocol and