File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ jobs:
3131 - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
3232 with :
3333 python-version : 3.14
34+ - uses : astral-sh/setup-uv@v5
3435
3536 - run : |
36- pip install tox
37- tox -e linters
37+ uv run ruff check tests sentry_sdk
38+ uv run ruff format --check tests sentry_sdk
39+ uv run tox -e linters
3840
3941 build_lambda_layer :
4042 name : Build Package
Original file line number Diff line number Diff line change 11# See https://pre-commit.com for more information
22# See https://pre-commit.com/hooks.html for more hooks
33repos :
4- - repo : https://github.com/astral-sh/ruff-pre-commit
5- rev : v0.13.2
4+ - repo : local
65 hooks :
76 - id : ruff-check
8- args : [--fix]
7+ name : ruff check
8+ entry : uv run ruff check --force-exclude --fix
9+ language : system
10+ types_or : [python, pyi]
11+ require_serial : true
912 - id : ruff-format
13+ name : ruff format
14+ entry : uv run ruff format --force-exclude
15+ language : system
16+ types_or : [python, pyi]
17+ require_serial : true
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ Use **tox** for type checking (not mypy directly):
2222
2323## Linting & Formatting
2424
25- Use ** tox** for linting (not ruff directly):
26- - ` uv run tox -e ruff `
25+ Use ** ruff** for linting and formatting:
26+ - ` uv run ruff check --fix tests sentry_sdk `
27+ - ` uv run ruff format tests sentry_sdk `
28+
29+
30+ Use ** tox** for running the other linting steps:
2731- Full lint suite: ` uv run tox -e linters `
2832- Full lint suite must pass before committing
2933
Original file line number Diff line number Diff line change 99 " tox-uv" ,
1010 " coverage[toml]" ,
1111 " pre-commit" ,
12+ " ruff" ,
1213]
1314
1415#
Original file line number Diff line number Diff line change 11mypy
2- ruff
32types-certifi
43types-protobuf
54types-gevent
Original file line number Diff line number Diff line change 8484 mypy: -r requirements-linting.txt
8585 mypy: werkzeug <2.3.0
8686 mypy: httpcore[asyncio]
87- ruff: -r requirements-linting.txt
8887
8988 # === Common ===
9089 py3.8-common: hypothesis
@@ -246,7 +245,6 @@ basepython =
246245 # version (configured in pyproject.toml), ensuring consistent behavior.
247246 linters: python3.14
248247 mypy: python3.14
249- ruff: python3.14
250248
251249commands =
252250 ; Running `pytest` as an executable suffers from an import error
@@ -256,16 +254,9 @@ commands =
256254
257255[testenv:linters]
258256commands =
259- ruff check tests sentry_sdk
260- ruff format --check tests sentry_sdk
261257 mypy sentry_sdk
262258 python scripts/find_raise_from_none.py
263259
264260[testenv:mypy]
265261commands =
266262 mypy sentry_sdk
267-
268- [testenv:ruff]
269- commands =
270- ruff check tests sentry_sdk
271- ruff format --check tests sentry_sdk
Original file line number Diff line number Diff line change @@ -400,7 +400,6 @@ deps =
400400 mypy: -r requirements-linting.txt
401401 mypy: werkzeug<2.3.0
402402 mypy: httpcore[asyncio]
403- ruff: -r requirements-linting.txt
404403
405404 # === Common ===
406405 py3.8-common: hypothesis
@@ -1100,11 +1099,10 @@ basepython =
11001099 py3.14t: python3.14t
11011100
11021101 # Python version is pinned here for consistency across environments.
1103- # Tools like ruff and mypy have options that pin the target Python
1102+ # Tools like mypy have options that pin the target Python
11041103 # version (configured in pyproject.toml), ensuring consistent behavior.
11051104 linters: python3.14
11061105 mypy: python3.14
1107- ruff: python3.14
11081106
11091107commands =
11101108 ; Running `pytest` as an executable suffers from an import error
@@ -1114,16 +1112,9 @@ commands =
11141112
11151113[testenv:linters]
11161114commands =
1117- ruff check tests sentry_sdk
1118- ruff format --check tests sentry_sdk
11191115 mypy sentry_sdk
11201116 python scripts/find_raise_from_none.py
11211117
11221118[testenv:mypy]
11231119commands =
11241120 mypy sentry_sdk
1125-
1126- [testenv:ruff]
1127- commands =
1128- ruff check tests sentry_sdk
1129- ruff format --check tests sentry_sdk
You can’t perform that action at this time.
0 commit comments