Skip to content

Commit d6075af

Browse files
committed
drivers/sdcard/sdcard.py: more changes to make ruff happy
Signed-off-by: Marcus Mendenhall, mendenmh@gmail.com
1 parent 6f81236 commit d6075af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

micropython/drivers/storage/sdcard/sdcard.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def __init__(self, spi, cs, baudrate=1320000, crc16_function=None):
6262

6363
def check_crcs(self, crc16_function):
6464
self.crc16 = crc16_function
65-
result = self.cmd(59, 1 if crc16_function else 0, None, release=True) # send CRC enable/disable command
65+
result = self.cmd(
66+
59, 1 if crc16_function else 0, None, release=True
67+
) # send CRC enable/disable command
6668

6769
def init_spi(self, baudrate):
6870
try:
@@ -122,7 +124,9 @@ def init_card(self, baudrate):
122124
raise OSError(EIO, "no CSD response")
123125
csd = bytearray(16)
124126
self.readinto(csd)
125-
self.CSD = csd_int = int.from_bytes(csd, "big") # convert 16-byte CSD to a giant integer for bit extraction
127+
self.CSD = csd_int = int.from_bytes(
128+
csd, "big"
129+
) # convert 16-byte CSD to a giant integer for bit extraction
126130
gb = self.gb # just for shorter code
127131
# use bit numbers from SD card spec v9.0.0, table 5.3.2
128132
vers = gb(csd_int, 126, 127)

0 commit comments

Comments
 (0)