Lint Python code with ruff

This commit is contained in:
Christian Clauss
2025-11-19 08:36:40 +01:00
parent f81d6bc7f0
commit 52ad34cea4
2 changed files with 7 additions and 1 deletions

View File

@@ -40,11 +40,16 @@ jobs:
- name: Install tools - name: Install tools
run: | run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install buildifier typos-cli brew install buildifier ruff typos-cli
- name: Check typos - name: Check typos
run: | run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
./scripts/check_typos.sh ./scripts/check_typos.sh
- name: Lint Python code
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
ruff check
# TODO(eustas): run buildifier # TODO(eustas): run buildifier

View File

@@ -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 - 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? anyway, so why don't you just switch to "the other" type?
""" """
# ruff: noqa
import struct import struct
from operator import itemgetter, methodcaller from operator import itemgetter, methodcaller
from itertools import accumulate, repeat from itertools import accumulate, repeat