Skip to content

Commit 95f410a

Browse files
committed
Use uv for linter workflow
1 parent 7d83063 commit 95f410a

File tree

3 files changed

+2666
-16
lines changed

3 files changed

+2666
-16
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,19 @@ jobs:
2626
.ci/merge-fixes.sh
2727
env:
2828
GH_TOKEN: ${{ github.token }}
29-
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
3029

31-
- name: Install test prerequisites
30+
- name: Install prerequisites
3231
id: deps
33-
# From docker.yml
34-
run: |
35-
sudo DEBIAN_FRONTEND=noninteractive apt-get update
36-
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
32+
run: pip install uv
3733

3834
- name: Code style check with ruff-minimal
3935
if: (success() || failure()) && steps.deps.outcome == 'success'
40-
run: tox -e ruff-minimal
41-
env:
42-
# https://github.com/ChartBoost/ruff-action/issues/7#issuecomment-1887780308
43-
RUFF_OUTPUT_FORMAT: github
44-
45-
- name: Code style check with pycodestyle-minimal
46-
if: (success() || failure()) && steps.deps.outcome == 'success'
47-
run: tox -e pycodestyle-minimal
36+
run: uv run --frozen --only-group lint -- ruff check --output-format github --ignore E402,E721,E731,E741,E742,E743,F401,F402,F403,F405,F821,F841,I001,PLC0206,PLC0208,PLC2401,PLC3002,PLE0302,PLR0124,PLR0402,PLR0911,PLR0912,PLR0913,PLR0915,PLR1704,PLR1711,PLR1714,PLR1716,PLR1736,PLR2004,PLR5501,PLW0120,PLW0211,PLW0602,PLW0603,PLW0642,PLW1508,PLW1510,PLW2901,PLW3301
4837

4938
- name: Code style check with relint
5039
if: (success() || failure()) && steps.deps.outcome == 'success'
51-
run: tox -e relint -- src/sage/
40+
run: uv run --frozen --only-group lint -- relint -c src/.relint.yml -- src/sage/
5241

5342
- name: Validate docstring markup as RST
5443
if: (success() || failure()) && steps.deps.outcome == 'success'
55-
run: tox -e rst
44+
run: uv run --frozen --only-group lint -- flake8 --select=RST src/sage/

renovate.json5

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
extends: [
4+
'config:best-practices',
5+
// Update uv.lock: https://docs.renovatebot.com/presets-default/#maintainlockfilesmonthly
6+
':maintainLockFilesMonthly',
7+
// Disable dashboard: https://docs.renovatebot.com/key-concepts/dashboard/
8+
':disableDependencyDashboard',
9+
],
10+
}

0 commit comments

Comments
 (0)