Skip to content

Switch tooling to uv, ruff, and prek#59

Merged
joelspadin merged 2 commits intozmkfirmware:mainfrom
joelspadin:use-uv
Feb 24, 2026
Merged

Switch tooling to uv, ruff, and prek#59
joelspadin merged 2 commits intozmkfirmware:mainfrom
joelspadin:use-uv

Conversation

@joelspadin
Copy link
Collaborator

Switched from Pip to uv for package management, Black, isort, and Pylint to Ruff for linting and formatting, and pre-commit to prek for commit hooks. These are faster and/or easier to work with.

Added an initial set of Ruff checks and updated the codebase to address issues detected by them.

The minimum Python version of 3.10 was originally set based on what is provided with Ubuntu 22.04 LTS. Now that we're instructing users to install ZMK CLI with uv though, we're no longer dependent on the system Python version. Updated to 3.11 to remove the need for the StrEnum backport.

@joelspadin joelspadin requested a review from caksoylar February 23, 2026 00:23
Switched from Pip to uv for package management, Black, isort, and Pylint
to Ruff for linting and formatting, and pre-commit to prek for commit
hooks. These are faster and/or easier to work with.

Added an initial set of Ruff checks and updated the codebase to address
issues detected by them.

The minimum Python version of 3.10 was originally set based on what is
provided with Ubuntu 22.04 LTS. Now that we're instructing users to
install ZMK CLI with uv though, we're no longer dependent on the system
Python version. Updated to 3.11 to remove the need for the StrEnum
backport.
Enabled a subset of flake8-bandit security rules.

Some S6* rules conflict with one another, with some requiring shell=True
and others preventing it. We enable S602 and S604 to prevent it.

Although we do use Mako templates, they are not used with any file types
that can contain executable code, so S7* rules aren't useful.
@joelspadin joelspadin merged commit f2f7a30 into zmkfirmware:main Feb 24, 2026
1 check passed
@joelspadin joelspadin deleted the use-uv branch February 24, 2026 01:15
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