Skip to content

Commit 8b0f917

Browse files
dguidoclaude
andcommitted
refactor: remove Super-linter and pylint, standardize on ruff
- Remove Super-linter Docker container (2.4GB overhead) - Remove pylint dependency and configuration - Consolidate linting into single job with ruff - Enhance ruff configuration with additional rule sets (bugbear, simplify, pylint-equivalent) - Reduce CI complexity from 84 to 42 lines - ~40 seconds faster CI runs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a43916e commit 8b0f917

File tree

3 files changed

+899
-67
lines changed

3 files changed

+899
-67
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
---
22
name: Lint Code Base
33

4-
defaults:
5-
run:
6-
# To load bashrc
7-
shell: bash -ieo pipefail {0}
8-
94
on:
105
pull_request:
116
branches: [master, dev]
@@ -19,49 +14,10 @@ concurrency:
1914

2015
permissions:
2116
contents: read
22-
packages: read
23-
# To report GitHub Actions status checks
24-
statuses: write
2517

2618
jobs:
27-
pylint:
28-
name: Lint Code Base (pylint)
29-
runs-on: ubuntu-latest
30-
31-
steps:
32-
- name: Checkout Code
33-
uses: actions/checkout@v4
34-
with:
35-
# super-linter needs the full git history to get the
36-
# list of files that changed across commits
37-
fetch-depth: 0
38-
39-
- name: Set up Python 3.8
40-
uses: actions/setup-python@v5
41-
with:
42-
python-version: 3.8
43-
44-
- name: Install dependencies
45-
run: |
46-
mkdir -p .github/linters
47-
cp pyproject.toml .github/linters
48-
49-
- name: Pylint
50-
uses: super-linter/super-linter/[email protected]
51-
if: always()
52-
env:
53-
# run linter on everything to catch preexisting problems
54-
VALIDATE_ALL_CODEBASE: true
55-
DEFAULT_BRANCH: master
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
# Run only pylint
58-
VALIDATE_PYTHON: true
59-
VALIDATE_PYTHON_PYLINT: true
60-
PYTHON_PYLINT_CONFIG_FILE: pyproject.toml
61-
FILTER_REGEX_EXCLUDE: .*tests/.*.(json|zip|sol)
62-
63-
ruff:
64-
name: Lint Code Base (ruff)
19+
lint:
20+
name: Lint Code Base
6521
runs-on: ubuntu-latest
6622

6723
steps:
@@ -74,7 +30,9 @@ jobs:
7430
python-version: 3.8
7531

7632
- name: Install development dependencies
77-
run: pip install -e ".[dev]"
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -e ".[dev]"
7836
7937
- name: Run ruff check
8038
run: ruff check .

pyproject.toml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ dev = [
4848
"pytest-xdist>=3.0.0",
4949
# Linting and type checking
5050
"ruff>=0.1.0",
51-
"pylint>=2.15.0",
5251
"mypy>=1.0.0",
5352
"types-setuptools",
5453
]
@@ -68,9 +67,23 @@ select = [
6867
"I", # isort
6968
"W", # pycodestyle warnings
7069
"UP", # pyupgrade
70+
"B", # flake8-bugbear (catches common bugs)
71+
"C4", # flake8-comprehensions (better comprehensions)
72+
"SIM", # flake8-simplify (simpler code)
73+
"TCH", # flake8-type-checking (type checking imports)
74+
"RUF", # Ruff-specific rules
75+
"PLR", # Pylint refactor checks
76+
"PLE", # Pylint error checks
77+
"PLW", # Pylint warning checks
7178
]
7279
ignore = [
7380
"E501", # line-too-long (handled by formatter)
81+
"PLR0912", # too-many-branches (existing code has complex logic)
82+
"PLR0913", # too-many-arguments (sometimes needed)
83+
"PLR2004", # magic-value-comparison (too strict)
84+
"SIM102", # collapsible-if (sometimes clearer as nested)
85+
"SIM108", # if-else-block-instead-of-if-exp (sometimes clearer)
86+
"RUF005", # collection-literal-concatenation (existing pattern)
7487
]
7588

7689
[tool.ruff.lint.per-file-ignores]
@@ -83,25 +96,6 @@ indent-style = "space"
8396
skip-magic-trailing-comma = false
8497
line-ending = "auto"
8598

86-
[tool.pylint.messages_control]
87-
disable = """
88-
missing-module-docstring,
89-
missing-class-docstring,
90-
missing-function-docstring,
91-
unnecessary-lambda,
92-
cyclic-import,
93-
line-too-long,
94-
invalid-name,
95-
fixme,
96-
too-many-return-statements,
97-
too-many-ancestors,
98-
logging-fstring-interpolation,
99-
logging-not-lazy,
100-
duplicate-code,
101-
import-error,
102-
unsubscriptable-object
103-
"""
104-
10599
[tool.pytest.ini_options]
106100
testpaths = ["tests"]
107101
python_files = "test_*.py"

0 commit comments

Comments
 (0)