Merge pull request #7755 from isacben/block-device-arguments-typing

Updated block_device type annotation
This commit is contained in:
Dan Halbert 2023-03-21 12:51:40 -04:00 committed by GitHub
commit 7ee85408a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) }, { MP_ROM_QSTR(MP_QSTR_enable_usb_drive), MP_ROM_PTR(&storage_enable_usb_drive_obj) },
//| class VfsFat: //| 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. //| """Create a new VfsFat filesystem around the given block device.
//| //|
//| :param block_device: Block device the the filesystem lives on""" //| :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 //| @staticmethod
//| def mkfs(self) -> None: //| def mkfs(block_device: BlockDevice) -> None:
//| """Format the block device, deleting any data that may have been there. //| """Format the block device, deleting any data that may have been there.
//| //|
//| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when //| **Limitations**: On SAMD21 builds, `mkfs()` will raise ``OSError(22)`` when