From 52ad34cea41bbecf7291c21da4a84846f0cf6e87 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Nov 2025 08:36:40 +0100 Subject: [PATCH] Lint Python code with ruff --- .github/workflows/lint.yml | 7 ++++++- research/brotlidump.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c504aa6..25d832f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,11 +40,16 @@ jobs: - name: Install tools run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - brew install buildifier typos-cli + brew install buildifier ruff typos-cli - name: Check typos run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" ./scripts/check_typos.sh + - name: Lint Python code + run: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + ruff check + # TODO(eustas): run buildifier diff --git a/research/brotlidump.py b/research/brotlidump.py index b59cd53..fd73ae4 100644 --- a/research/brotlidump.py +++ b/research/brotlidump.py @@ -8,6 +8,7 @@ I found the following issues with the Brotli format: - The block type code is useless if NBLTYPES==2, you would only need 1 symbol anyway, so why don't you just switch to "the other" type? """ +# ruff: noqa import struct from operator import itemgetter, methodcaller from itertools import accumulate, repeat