Skip to content

Conversation

pantheraleo-7
Copy link
Contributor

@pantheraleo-7 pantheraleo-7 commented Oct 5, 2025

It results in the following error:
ERROR Failed to resolve settings for ruff.toml: Rule `E999` was removed and cannot be selected.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Oct 5, 2025

This rule still exists in the version of ruff that is specified by the pre-commit config: https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/main/.pre-commit-config.yaml#L13

I would prefer not to change the ruff configuring in an individual library like this. Ideally we will want to make the same change across all libraries at the same time with a patch rollout. When the files diverge due to individual repos getting one off changes like this it complicates the patching process to update them.

@pantheraleo-7 pantheraleo-7 deleted the ruff-e999 branch October 5, 2025 13:50
@pantheraleo-7
Copy link
Contributor Author

I thought to check other adafruit libraries, and the first library (that I checked) circuitpython uses ruff v0.9.4. So there's no parity to begin with..

Also, I see that ruff was added quite recently to this repo #103, so why was such an old version of ruff (v0.3.4) chosen in the first place?

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Oct 5, 2025

@pantheraleo-7 The version was originally chosen further back. Around the time of this PR or a little before: adafruit/cookiecutter-adafruit-circuitpython#237. It was discussed during some of the of the public meetings that we hold on discord. IIRC the version selected for cookiecutter was taken from one of the other libraries where a community member had first begun the effort of switching from black to ruff. When it was adopted in this library more recently it was intentionally set to the same version as cookiecutter and the other libraries to keep them in sync.

The circuitpython core repo is a separate case its primary contents are the C code that makes the circuitpython core firmware. The libraries that I mentioned wanting to keep in sync are all of the ones included in the bundle as subprojects you can find them listed in the folders here: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/main/libraries. We have tools to issue patches to all of them, but the tools work best when configuration files are kept in sync.

Updating to a newer version of ruff would be a good thing to do, but also requires a big effort because it can require changes in any library where the new version causes actions to fail.

If you're interested in getting more involved with the project and/or helping with maintenance on things like this I encourage you to come join us on discord https://adafru.it/discord

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