Skip to content

Conversation

@Josverl
Copy link
Contributor

@Josverl Josverl commented Nov 13, 2025

ruff ruff 0.11.6 is warming about the settings.

 ruff format 
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'mccabe' -> 'lint.mccabe'
  - 'pylint' -> 'lint.pylint'
  - 'per-file-ignores' -> 'lint.per-file-ignores'

@Josverl Josverl force-pushed the chore_ruff branch 2 times, most recently from adf3020 to b0a30e5 Compare November 18, 2025 09:07
"unix-ffi",
]
line-length = 99
target-version = "py38" # enable use of walrus operator
Copy link
Contributor Author

@Josverl Josverl Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped to 3.8 to support the walrus operator which is supported and used.

invalid-syntax: Cannot use named assignment expression (`:=`) on Python 3.7 (syntax was added in Python 3.8)
   --> micropython/bluetooth/aioble/aioble/peripheral.py:137:20
    |
135 |                 (16, _ADV_TYPE_UUID128_COMPLETE),
136 |             ):
137 |                 if uuids := [bytes(uuid) for uuid in services if len(bytes(uuid)) == uuid_len]:
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138 |                     resp_data = _append(adv_data, resp_data, code, b"".join(uuids))

I think this would need the same change on the micropython/micropython repo as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would need the same change on the micropython/micropython repo as well

Yes, that's fair enough.

Josverl added a commit to Josverl/micropython that referenced this pull request Nov 18, 2025
- Update to python 3.8 syntax.
- Ignore import not at top of module warnings.
- Exclude common SDK folders.
- Exclude cpydiff test with intentional error.

Also see: micropython/micropython-lib#1059

Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
Josverl and others added 2 commits November 19, 2025 00:27
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
Changes are:
- Reorganize lint settings to new sections.
- Align ignore rules with micropython/micropython repo.
- Update to python38 syntax to enable `:=` operator.

Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
@dpgeorge dpgeorge merged commit 95fd713 into micropython:master Nov 18, 2025
4 checks passed
@dpgeorge
Copy link
Member

Thanks for updating.

@Josverl Josverl deleted the chore_ruff branch November 18, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants