@@ -89,7 +89,7 @@ STATIC mp_obj_t audiomp3_mp3file_make_new(const mp_obj_type_t *type, size_t n_ar
8989 return MP_OBJ_FROM_PTR (self );
9090}
9191
92- //| def deinit(self, ) -> Any :
92+ //| def deinit(self, ) -> None :
9393//| """Deinitialises the MP3 and releases all memory resources for reuse."""
9494//| ...
9595//|
@@ -106,13 +106,13 @@ STATIC void check_for_deinit(audiomp3_mp3file_obj_t *self) {
106106 }
107107}
108108
109- //| def __enter__(self, ) -> Any :
109+ //| def __enter__(self, ) -> MP3 :
110110//| """No-op used by Context Managers."""
111111//| ...
112112//|
113113// Provided by context manager helper.
114114
115- //| def __exit__(self, ) -> Any :
115+ //| def __exit__(self, ) -> None :
116116//| """Automatically deinitializes the hardware when exiting a context. See
117117//| :ref:`lifetime-and-contextmanagers` for more info."""
118118//| ...
@@ -124,7 +124,7 @@ STATIC mp_obj_t audiomp3_mp3file_obj___exit__(size_t n_args, const mp_obj_t *arg
124124}
125125STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (audiomp3_mp3file___exit___obj , 4 , 4 , audiomp3_mp3file_obj___exit__ );
126126
127- //| file: Any = ...
127+ //| file: Optional[file] = ...
128128//| """File to play back."""
129129//|
130130STATIC mp_obj_t audiomp3_mp3file_obj_get_file (mp_obj_t self_in ) {
@@ -154,7 +154,7 @@ const mp_obj_property_t audiomp3_mp3file_file_obj = {
154154
155155
156156
157- //| sample_rate: Any = ...
157+ //| sample_rate: Optional[int] = ...
158158//| """32 bit value that dictates how quickly samples are loaded into the DAC
159159//| in Hertz (cycles per second). When the sample is looped, this can change
160160//| the pitch output without changing the underlying sample."""
@@ -181,7 +181,7 @@ const mp_obj_property_t audiomp3_mp3file_sample_rate_obj = {
181181 (mp_obj_t )& mp_const_none_obj },
182182};
183183
184- //| bits_per_sample: Any = ...
184+ //| bits_per_sample: int = ...
185185//| """Bits per sample. (read only)"""
186186//|
187187STATIC mp_obj_t audiomp3_mp3file_obj_get_bits_per_sample (mp_obj_t self_in ) {
@@ -198,7 +198,7 @@ const mp_obj_property_t audiomp3_mp3file_bits_per_sample_obj = {
198198 (mp_obj_t )& mp_const_none_obj },
199199};
200200
201- //| channel_count: Any = ...
201+ //| channel_count: int = ...
202202//| """Number of audio channels. (read only)"""
203203//|
204204STATIC mp_obj_t audiomp3_mp3file_obj_get_channel_count (mp_obj_t self_in ) {
@@ -215,7 +215,7 @@ const mp_obj_property_t audiomp3_mp3file_channel_count_obj = {
215215 (mp_obj_t )& mp_const_none_obj },
216216};
217217
218- //| rms_level: Any = ...
218+ //| rms_level: float = ...
219219//| """The RMS audio level of a recently played moment of audio. (read only)"""
220220//|
221221STATIC mp_obj_t audiomp3_mp3file_obj_get_rms_level (mp_obj_t self_in ) {
0 commit comments