diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2023-10-21 17:40:27 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-11-03 13:30:41 +1100 |
| commit | bbd8760bd9a2302e5abee29db279102bb11d7732 (patch) | |
| tree | 71fe5bb52b871add11343c8ccc298a56dbf24ea3 /tools | |
| parent | 303ccca7c62bd48b9f6a519549caf0d0f3d2624e (diff) | |
all: Update Python formatting to ruff-format.
This updates a small number of files that change with ruff-format's (vs
black's) rules.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mpremote/mpremote/transport_serial.py | 2 | ||||
| -rwxr-xr-x | tools/mpy-tool.py | 10 | ||||
| -rwxr-xr-x | tools/pyboard.py | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/tools/mpremote/mpremote/transport_serial.py b/tools/mpremote/mpremote/transport_serial.py index e04f5b4ac..23a379d16 100644 --- a/tools/mpremote/mpremote/transport_serial.py +++ b/tools/mpremote/mpremote/transport_serial.py @@ -331,7 +331,7 @@ class SerialTransport(Transport): def fs_stat(self, src): try: self.exec("import os") - return os.stat_result(self.eval("os.stat(%s)" % (("'%s'" % src)), parse=True)) + return os.stat_result(self.eval("os.stat(%s)" % ("'%s'" % src), parse=True)) except TransportError as e: reraise_filesystem_error(e, src) diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index 95b2c492d..8d86c1017 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -1454,7 +1454,15 @@ def freeze_mpy(firmware_qstr_idents, compiled_modules): # As in qstr.c, set so that the first dynamically allocated pool is twice this size; must be <= the len qstr_pool_alloc = min(len(new), 10) - global bc_content, const_str_content, const_int_content, const_obj_content, const_table_qstr_content, const_table_ptr_content, raw_code_count, raw_code_content + global \ + bc_content, \ + const_str_content, \ + const_int_content, \ + const_obj_content, \ + const_table_qstr_content, \ + const_table_ptr_content, \ + raw_code_count, \ + raw_code_content qstr_content = 0 bc_content = 0 const_str_content = 0 diff --git a/tools/pyboard.py b/tools/pyboard.py index 723e43c01..c422b64ac 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -546,7 +546,7 @@ class Pyboard: def fs_stat(self, src): try: self.exec_("import os") - return os.stat_result(self.eval("os.stat(%s)" % (("'%s'" % src)), parse=True)) + return os.stat_result(self.eval("os.stat(%s)" % ("'%s'" % src), parse=True)) except PyboardError as e: raise e.convert(src) |
