mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
all: Upgrade to ruff v0.9.6.
Signed-off-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"]:
|
||||
|
||||
Reference in New Issue
Block a user