@@ -73,7 +73,7 @@ STATIC mp_obj_t touchio_touchin_make_new(const mp_obj_type_t *type,
73
73
return (mp_obj_t ) self ;
74
74
}
75
75
76
- //| def deinit(self) -> Any :
76
+ //| def deinit(self) -> None :
77
77
//| """Deinitialises the TouchIn and releases any hardware resources for reuse."""
78
78
//| ...
79
79
//|
@@ -90,13 +90,13 @@ STATIC void check_for_deinit(touchio_touchin_obj_t *self) {
90
90
}
91
91
}
92
92
93
- //| def __enter__(self) -> Any :
93
+ //| def __enter__(self) -> TouchIn :
94
94
//| """No-op used by Context Managers."""
95
95
//| ...
96
96
//|
97
97
// Provided by context manager helper.
98
98
99
- //| def __exit__(self) -> Any :
99
+ //| def __exit__(self) -> None :
100
100
//| """Automatically deinitializes the hardware when exiting a context. See
101
101
//| :ref:`lifetime-and-contextmanagers` for more info."""
102
102
//| ...
@@ -108,7 +108,7 @@ STATIC mp_obj_t touchio_touchin_obj___exit__(size_t n_args, const mp_obj_t *args
108
108
}
109
109
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (touchio_touchin___exit___obj , 4 , 4 , touchio_touchin_obj___exit__ );
110
110
111
- //| value: Any = ...
111
+ //| value: bool = ...
112
112
//| """Whether the touch pad is being touched or not. (read-only)
113
113
//|
114
114
//| True when `raw_value` > `threshold`."""
@@ -128,7 +128,7 @@ const mp_obj_property_t touchio_touchin_value_obj = {
128
128
};
129
129
130
130
131
- //| raw_value: Any = ...
131
+ //| raw_value: int = ...
132
132
//| """The raw touch measurement as an `int`. (read-only)"""
133
133
//|
134
134
STATIC mp_obj_t touchio_touchin_obj_get_raw_value (mp_obj_t self_in ) {
@@ -147,7 +147,7 @@ const mp_obj_property_t touchio_touchin_raw_value_obj = {
147
147
};
148
148
149
149
150
- //| threshold: Any = ...
150
+ //| threshold: Optional[int] = ...
151
151
//| """Minimum `raw_value` needed to detect a touch (and for `value` to be `True`).
152
152
//|
153
153
//| When the **TouchIn** object is created, an initial `raw_value` is read from the pin,
0 commit comments