43
43
//| directly."""
44
44
//|
45
45
46
- //| def mount(filesystem: Any , mount_path: Any , *, readonly: bool = False) -> Any :
46
+ //| def mount(filesystem: VfsFat , mount_path: string , *, readonly: bool = False) -> None :
47
47
//| """Mounts the given filesystem object at the given path.
48
48
//|
49
49
//| This is the CircuitPython analog to the UNIX ``mount`` command.
@@ -80,7 +80,7 @@ mp_obj_t storage_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_arg
80
80
}
81
81
MP_DEFINE_CONST_FUN_OBJ_KW (storage_mount_obj , 2 , storage_mount );
82
82
83
- //| def umount(mount: Any ) -> Any :
83
+ //| def umount(mount: Union[string, VfsFat] ) -> None :
84
84
//| """Unmounts the given filesystem object or if *mount* is a path, then unmount
85
85
//| the filesystem mounted at that location.
86
86
//|
@@ -98,7 +98,7 @@ mp_obj_t storage_umount(mp_obj_t mnt_in) {
98
98
}
99
99
MP_DEFINE_CONST_FUN_OBJ_1 (storage_umount_obj , storage_umount );
100
100
101
- //| def remount(mount_path: Any , readonly: bool = False, *, disable_concurrent_write_protection: bool = False) -> Any :
101
+ //| def remount(mount_path: string , readonly: bool = False, *, disable_concurrent_write_protection: bool = False) -> None :
102
102
//| """Remounts the given path with new parameters.
103
103
//|
104
104
//| :param bool readonly: True when the filesystem should be readonly to CircuitPython.
@@ -128,7 +128,7 @@ mp_obj_t storage_remount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_a
128
128
}
129
129
MP_DEFINE_CONST_FUN_OBJ_KW (storage_remount_obj , 1 , storage_remount );
130
130
131
- //| def getmount(mount_path: Any ) -> Any :
131
+ //| def getmount(mount_path: string ) -> VfsFat :
132
132
//| """Retrieves the mount object associated with the mount path"""
133
133
//| ...
134
134
//|
@@ -137,7 +137,7 @@ mp_obj_t storage_getmount(const mp_obj_t mnt_in) {
137
137
}
138
138
MP_DEFINE_CONST_FUN_OBJ_1 (storage_getmount_obj , storage_getmount );
139
139
140
- //| def erase_filesystem() -> Any :
140
+ //| def erase_filesystem() -> None :
141
141
//| """Erase and re-create the ``CIRCUITPY`` filesystem.
142
142
//|
143
143
//| On boards that present USB-visible ``CIRCUITPY`` drive (e.g., SAMD21 and SAMD51),
@@ -168,51 +168,51 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = {
168
168
{ MP_ROM_QSTR (MP_QSTR_erase_filesystem ), MP_ROM_PTR (& storage_erase_filesystem_obj ) },
169
169
170
170
//| class VfsFat:
171
- //| def __init__(self, block_device: Any ) -> None:
171
+ //| def __init__(self, block_device: string ) -> None:
172
172
//| """Create a new VfsFat filesystem around the given block device.
173
173
//|
174
174
//| :param block_device: Block device the the filesystem lives on"""
175
175
//|
176
- //| label: Any = ...
176
+ //| label: string = ...
177
177
//| """The filesystem label, up to 11 case-insensitive bytes. Note that
178
178
//| this property can only be set when the device is writable by the
179
179
//| microcontroller."""
180
180
//| ...
181
181
//|
182
- //| def mkfs(self) -> Any :
182
+ //| def mkfs(self) -> None :
183
183
//| """Format the block device, deleting any data that may have been there"""
184
184
//| ...
185
185
//|
186
- //| def open(self, path: Any , mode: Any ) -> Any :
186
+ //| def open(self, path: string , mode: string ) -> None :
187
187
//| """Like builtin ``open()``"""
188
188
//| ...
189
189
//|
190
- //| def ilistdir(self, path: Any ) -> Any :
190
+ //| def ilistdir(self, path: string ) -> iterator :
191
191
//| """Return an iterator whose values describe files and folders within
192
192
//| ``path``"""
193
193
//| ...
194
194
//|
195
- //| def mkdir(self, path: Any ) -> Any :
195
+ //| def mkdir(self, path: string ) -> None :
196
196
//| """Like `os.mkdir`"""
197
197
//| ...
198
198
//|
199
- //| def rmdir(self, path: Any ) -> Any :
199
+ //| def rmdir(self, path: string ) -> None :
200
200
//| """Like `os.rmdir`"""
201
201
//| ...
202
202
//|
203
- //| def stat(self, path: Any ) -> Any :
203
+ //| def stat(self, path: string ) -> string :
204
204
//| """Like `os.stat`"""
205
205
//| ...
206
206
//|
207
- //| def statvfs(self, path: Any ) -> Any :
207
+ //| def statvfs(self, path: string ) -> Tuple[string, string, string, string, string, string, string, string, string, string] :
208
208
//| """Like `os.statvfs`"""
209
209
//| ...
210
210
//|
211
- //| def mount(self, readonly: Any , mkfs: Any ) -> Any :
211
+ //| def mount(self, readonly: bool , mkfs: VfsFat ) -> None :
212
212
//| """Don't call this directly, call `storage.mount`."""
213
213
//| ...
214
214
//|
215
- //| def umount(self) -> Any :
215
+ //| def umount(self) -> None :
216
216
//| """Don't call this directly, call `storage.umount`."""
217
217
//| ...
218
218
//|
0 commit comments