Skip to content

Commit 992eecf

Browse files
projectgusdpgeorge
authored andcommitted
all: Enable Ruff lint F541 'f-string without any placeholders'.
Signed-off-by: Angus Gratton <[email protected]>
1 parent 6c6fab1 commit 992eecf

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Diff for: micropython/espflash/espflash.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def flash_read_size(self):
235235

236236
def flash_attach(self):
237237
self._command(_CMD_SPI_ATTACH, struct.pack("<II", 0, 0))
238-
print(f"Flash attached")
238+
print("Flash attached")
239239

240240
def flash_config(self, flash_size=2 * 1024 * 1024):
241241
self._command(
@@ -288,7 +288,7 @@ def flash_write_file(self, path, blksize=0x1000):
288288
def flash_verify_file(self, path, digest=None, offset=0):
289289
if digest is None:
290290
if self.md5sum is None:
291-
raise Exception(f"MD5 checksum missing.")
291+
raise Exception("MD5 checksum missing.")
292292
digest = binascii.hexlify(self.md5sum.digest())
293293

294294
size = os.stat(path)[6]
@@ -300,7 +300,7 @@ def flash_verify_file(self, path, digest=None, offset=0):
300300
if digest == data[0:32]:
301301
print("Firmware verified.")
302302
else:
303-
raise Exception(f"Firmware verification failed.")
303+
raise Exception("Firmware verification failed.")
304304

305305
def reboot(self):
306306
payload = struct.pack("<I", 0)

Diff for: micropython/lora/lora-async/lora/async_modem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async def _wait(self, will_irq, idx, timeout_ms):
109109
await asyncio.sleep_ms(timeout_ms)
110110

111111
if _DEBUG:
112-
print(f"wait complete")
112+
print("wait complete")
113113

114114
def _callback(self):
115115
# IRQ callback from BaseModem._radio_isr. May be in Hard IRQ context.

Diff for: pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ ignore = [
6262
"F403",
6363
"F405",
6464
"E501",
65-
"F541",
6665
"ISC001",
6766
"ISC003", # micropython does not support implicit concatenation of f-strings
6867
"PIE810", # micropython does not support passing tuples to .startswith or .endswith

0 commit comments

Comments
 (0)