summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authordherrada <dylan.herrada@adafruit.com>2020-07-03 11:13:16 -0400
committerdherrada <dylan.herrada@adafruit.com>2020-07-03 11:13:16 -0400
commitd9a98bd05c90ebe4746e8a646e28d26030864c94 (patch)
tree0d1944820df9995d8241ad44c7cf8b47294daa2b /shared-bindings
parentc8437e6595bf23c74ba779c32c7177538e21a52b (diff)
Added type hints to rotaryio
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/rotaryio/IncrementalEncoder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-bindings/rotaryio/IncrementalEncoder.c b/shared-bindings/rotaryio/IncrementalEncoder.c
index 418de664e..26a50dde9 100644
--- a/shared-bindings/rotaryio/IncrementalEncoder.c
+++ b/shared-bindings/rotaryio/IncrementalEncoder.c
@@ -80,7 +80,7 @@ STATIC mp_obj_t rotaryio_incrementalencoder_make_new(const mp_obj_type_t *type,
return MP_OBJ_FROM_PTR(self);
}
-//| def deinit(self) -> Any:
+//| def deinit(self) -> None:
//| """Deinitializes the IncrementalEncoder and releases any hardware resources for reuse."""
//| ...
//|
@@ -97,13 +97,13 @@ STATIC void check_for_deinit(rotaryio_incrementalencoder_obj_t *self) {
}
}
-//| def __enter__(self) -> Any:
+//| def __enter__(self) -> IncrementalEncoder:
//| """No-op used by Context Managers."""
//| ...
//|
// Provided by context manager helper.
-//| def __exit__(self) -> Any:
+//| def __exit__(self) -> None:
//| """Automatically deinitializes the hardware when exiting a context. See
//| :ref:`lifetime-and-contextmanagers` for more info."""
//| ...
@@ -116,7 +116,7 @@ STATIC mp_obj_t rotaryio_incrementalencoder_obj___exit__(size_t n_args, const mp
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(rotaryio_incrementalencoder___exit___obj, 4, 4, rotaryio_incrementalencoder_obj___exit__);
-//| position: Any = ...
+//| position: Optional[int] = ...
//| """The current position in terms of pulses. The number of pulses per rotation is defined by the
//| specific hardware."""
//|