summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-04-24 10:43:38 +1000
committerDamien George <damien@micropython.org>2025-04-24 21:42:21 +1000
commitf5cb9eb9746bea3dc49cc1ae0d424058fb7a09f2 (patch)
tree681d0d10797e3252a93a84e4e87594b33eff3b37
parent0b729623366dab3aa2575eeab934b2629f8e52c5 (diff)
top: Bump Ruff version to v0.11.6.
Brings it into sync with a matching change to micropython-lib (which was much older). Includes one small automatic fix. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--.github/workflows/ruff.yml4
-rw-r--r--.pre-commit-config.yaml4
-rwxr-xr-xtools/mpy_ld.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml
index 9265c25bc..4c4a2a316 100644
--- a/.github/workflows/ruff.yml
+++ b/.github/workflows/ruff.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- # ruff version should be kept in sync with .pre-commit-config.yaml
- - run: pipx install ruff==0.9.6
+ # ruff version should be kept in sync with .pre-commit-config.yaml & also micropython-lib
+ - run: pipx install ruff==0.11.6
- run: ruff check --output-format=github .
- run: ruff format --diff .
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d07f9b0fd..ac9785bb5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -12,8 +12,8 @@ repos:
verbose: true
stages: [commit-msg]
- repo: https://github.com/charliermarsh/ruff-pre-commit
- # Version should be kept in sync with .github/workflows/ruff.yml
- rev: v0.9.6
+ # Version should be kept in sync with .github/workflows/ruff.yml & also micropython-lib
+ rev: v0.11.6
hooks:
- id: ruff
- id: ruff-format
diff --git a/tools/mpy_ld.py b/tools/mpy_ld.py
index 70cab2b89..a47653f90 100755
--- a/tools/mpy_ld.py
+++ b/tools/mpy_ld.py
@@ -1131,7 +1131,7 @@ def load_object_file(env, f, felf):
elif sym.entry["st_shndx"] == "SHN_UNDEF" and sym["st_info"]["bind"] == "STB_GLOBAL":
# Undefined global symbol, needs resolving
env.unresolved_syms.append(sym)
- if len(dup_errors):
+ if dup_errors:
raise LinkError("\n".join(dup_errors))
@@ -1214,7 +1214,7 @@ def link_objects(env, native_qstr_vals_len):
else:
undef_errors.append("{}: undefined symbol: {}".format(sym.filename, sym.name))
- if len(undef_errors):
+ if undef_errors:
raise LinkError("\n".join(undef_errors))
# Align sections, assign their addresses, and create full_text