mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Lint Python code with ruff
This commit is contained in:
7
.github/workflows/lint.yml
vendored
7
.github/workflows/lint.yml
vendored
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user