diff options
| author | Christian Clauss <cclauss@me.com> | 2025-02-18 10:01:09 +0100 |
|---|---|---|
| committer | Christian Clauss <cclauss@me.com> | 2025-02-25 13:02:49 +0100 |
| commit | dc2fcfcc5511a371ff684f7d7772e7a7b479246d (patch) | |
| tree | 72ba38184b3291afd41200da2a8a482868308a6a /tools | |
| parent | 3f0dd13d931c88a759a779853dfeaee566f0e79a (diff) | |
all: Upgrade to ruff v0.9.6.
Signed-off-by: Christian Clauss <cclauss@me.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen-cpydiff.py | 6 | ||||
| -rw-r--r-- | tools/mpremote/mpremote/transport.py | 2 | ||||
| -rwxr-xr-x | tools/pyboard.py | 2 | ||||
| -rwxr-xr-x | tools/pydfu.py | 5 |
4 files changed, 7 insertions, 8 deletions
diff --git a/tools/gen-cpydiff.py b/tools/gen-cpydiff.py index 578b6c136..c0b573438 100644 --- a/tools/gen-cpydiff.py +++ b/tools/gen-cpydiff.py @@ -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 diff --git a/tools/mpremote/mpremote/transport.py b/tools/mpremote/mpremote/transport.py index d84579695..c8fdc54a8 100644 --- a/tools/mpremote/mpremote/transport.py +++ b/tools/mpremote/mpremote/transport.py @@ -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: diff --git a/tools/pyboard.py b/tools/pyboard.py index 0cf5b3d46..d49365f61 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -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: diff --git a/tools/pydfu.py b/tools/pydfu.py index e1e4074a6..cd7354818 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -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"]: |
