We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7469a78 commit c270013Copy full SHA for c270013
adafruit_imageload/pnm/__init__.py
@@ -124,7 +124,8 @@ def load( # noqa: PLR0912 Too many branches
124
125
next_byte = file.read(1)
126
if next_byte == b"":
127
- raise RuntimeError(f"Unsupported image format {magic_number!r}")
+ # mpy-cross does not support !r in f-string substitution, so ignore ruff rule
128
+ raise RuntimeError("Unsupported image format {!r}".format(magic_number)) # noqa: UP032, f-string
129
if next_byte == b"#": # comment found, seek until a newline or EOF is found
130
while file.read(1) not in [b"", b"\n"]: # EOF or NL
131
pass
0 commit comments