all: Upgrade to ruff v0.9.6.

Signed-off-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Christian Clauss
2025-02-18 10:01:09 +01:00
parent 3f0dd13d93
commit dc2fcfcc55
54 changed files with 73 additions and 17 deletions

View File

@@ -22,9 +22,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
""" gen-cpydiff generates documentation which outlines operations that differ between MicroPython
and CPython. This script is called by the docs Makefile for html and Latex and may be run
manually using the command make gen-cpydiff. """
"""gen-cpydiff generates documentation which outlines operations that differ between MicroPython
and CPython. This script is called by the docs Makefile for html and Latex and may be run
manually using the command make gen-cpydiff."""
import os
import subprocess

View File

@@ -73,7 +73,7 @@ class Transport:
def repr_consumer(b):
buf.extend(b.replace(b"\x04", b""))
cmd = "import os\nfor f in os.ilistdir(%s):\n" " print(repr(f), end=',')" % (
cmd = "import os\nfor f in os.ilistdir(%s):\n print(repr(f), end=',')" % (
("'%s'" % src) if src else ""
)
try:

View File

@@ -530,7 +530,7 @@ class Pyboard:
def repr_consumer(b):
buf.extend(b.replace(b"\x04", b""))
cmd = "import os\nfor f in os.ilistdir(%s):\n" " print(repr(f), end=',')" % (
cmd = "import os\nfor f in os.ilistdir(%s):\n print(repr(f), end=',')" % (
("'%s'" % src) if src else ""
)
try:

View File

@@ -344,8 +344,7 @@ def read_dfu_file(filename):
# B uint8_t targets Number of targets
dfu_prefix, data = consume("<5sBIB", data, "signature version size targets")
print(
" %(signature)s v%(version)d, image size: %(size)d, "
"targets: %(targets)d" % dfu_prefix
" %(signature)s v%(version)d, image size: %(size)d, targets: %(targets)d" % dfu_prefix
)
for target_idx in range(dfu_prefix["targets"]):
# Decode the Image Prefix
@@ -359,7 +358,7 @@ def read_dfu_file(filename):
# I uint32_t size Size of image (without prefix)
# I uint32_t elements Number of elements in the image
img_prefix, data = consume(
"<6sBI255s2I", data, "signature altsetting named name " "size elements"
"<6sBI255s2I", data, "signature altsetting named name size elements"
)
img_prefix["num"] = target_idx
if img_prefix["named"]: