pre-commit: autoupdate hooks (#1639)

* Update pre-commit hook versions

* fix

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
This commit is contained in:
Adeeb Shihadeh
2023-09-07 19:10:30 -07:00
committed by GitHub
parent ee21517c77
commit d87d33cb51
6 changed files with 14 additions and 14 deletions

View File

@@ -421,7 +421,7 @@ class STBootloaderSPIHandle(BaseSTBootloaderHandle):
def program(self, address, dat):
bs = 256 # max block size for writing to flash over SPI
dat += b"\xFF" * ((bs - len(dat)) % bs)
for i in range(0, len(dat) // bs):
for i in range(len(dat) // bs):
block = dat[i * bs:(i + 1) * bs]
self._cmd(0x31, data=[
struct.pack('>I', address + i*bs),