Skip to content

Commit d9a98bd

Browse files
committed
Added type hints to rotaryio
1 parent c8437e6 commit d9a98bd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

shared-bindings/rotaryio/IncrementalEncoder.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ STATIC mp_obj_t rotaryio_incrementalencoder_make_new(const mp_obj_type_t *type,
8080
return MP_OBJ_FROM_PTR(self);
8181
}
8282

83-
//| def deinit(self) -> Any:
83+
//| def deinit(self) -> None:
8484
//| """Deinitializes the IncrementalEncoder and releases any hardware resources for reuse."""
8585
//| ...
8686
//|
@@ -97,13 +97,13 @@ STATIC void check_for_deinit(rotaryio_incrementalencoder_obj_t *self) {
9797
}
9898
}
9999

100-
//| def __enter__(self) -> Any:
100+
//| def __enter__(self) -> IncrementalEncoder:
101101
//| """No-op used by Context Managers."""
102102
//| ...
103103
//|
104104
// Provided by context manager helper.
105105

106-
//| def __exit__(self) -> Any:
106+
//| def __exit__(self) -> None:
107107
//| """Automatically deinitializes the hardware when exiting a context. See
108108
//| :ref:`lifetime-and-contextmanagers` for more info."""
109109
//| ...
@@ -116,7 +116,7 @@ STATIC mp_obj_t rotaryio_incrementalencoder_obj___exit__(size_t n_args, const mp
116116
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(rotaryio_incrementalencoder___exit___obj, 4, 4, rotaryio_incrementalencoder_obj___exit__);
117117

118118

119-
//| position: Any = ...
119+
//| position: Optional[int] = ...
120120
//| """The current position in terms of pulses. The number of pulses per rotation is defined by the
121121
//| specific hardware."""
122122
//|

0 commit comments

Comments
 (0)