From 9e630a565ed9d8b2259596d3ea526498baf94f67 Mon Sep 17 00:00:00 2001 From: Isaac Benitez Date: Sun, 19 Mar 2023 15:08:29 -0700 Subject: [PATCH 1/2] Updated block_device type annotation --- shared-bindings/storage/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 9e82654bc9af1..3f0dc5f6f3f4f 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -252,7 +252,7 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_enable_usb_drive), MP_ROM_PTR(&storage_enable_usb_drive_obj) }, //| class VfsFat: -//| def __init__(self, block_device: str) -> None: +//| def __init__(self, block_device: BlockDevice) -> None: //| """Create a new VfsFat filesystem around the given block device. //| //| :param block_device: Block device the the filesystem lives on""" @@ -267,7 +267,7 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = { //| ... //| //| @staticmethod -//| def mkfs(self) -> None: +//| def mkfs(self, block_device: BlockDevice) -> None: //| """Format the block device, deleting any data that may have been there. //| //| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when From d9d27a3e315531622bf78f4b19280a022973b3c2 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 21 Mar 2023 10:30:03 -0400 Subject: [PATCH 2/2] Fix signature of `mkfs()` --- shared-bindings/storage/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 3f0dc5f6f3f4f..c4bd728f67d85 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -267,7 +267,7 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = { //| ... //| //| @staticmethod -//| def mkfs(self, block_device: BlockDevice) -> None: +//| def mkfs(block_device: BlockDevice) -> None: //| """Format the block device, deleting any data that may have been there. //| //| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when