Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.14
- uses: astral-sh/setup-uv@v5

- run: |
pip install tox
tox -e linters
uv run ruff check tests sentry_sdk
uv run ruff format --check tests sentry_sdk
uv run tox -e linters
build_lambda_layer:
name: Build Package
Expand Down
14 changes: 11 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.2
- repo: local
hooks:
- id: ruff-check
args: [--fix]
name: ruff check
entry: uv run ruff check --force-exclude --fix
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff format
entry: uv run ruff format --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ Use **tox** for type checking (not mypy directly):

## Linting & Formatting

Use **tox** for linting (not ruff directly):
- `uv run tox -e ruff`
Use **ruff** for linting and formatting:
- `uv run ruff check --fix tests sentry_sdk`
- `uv run ruff format tests sentry_sdk`


Use **tox** for running the other linting steps:
- Full lint suite: `uv run tox -e linters`
- Full lint suite must pass before committing

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dev = [
"tox-uv",
"coverage[toml]",
"pre-commit",
"ruff",
]

#
Expand Down
1 change: 0 additions & 1 deletion requirements-linting.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mypy
ruff
types-certifi
types-protobuf
types-gevent
Expand Down
9 changes: 0 additions & 9 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ deps =
mypy: -r requirements-linting.txt
mypy: werkzeug<2.3.0
mypy: httpcore[asyncio]
ruff: -r requirements-linting.txt

# === Common ===
py3.8-common: hypothesis
Expand Down Expand Up @@ -246,7 +245,6 @@ basepython =
# version (configured in pyproject.toml), ensuring consistent behavior.
linters: python3.14
mypy: python3.14
ruff: python3.14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template comment not updated, will revert on regeneration

Low Severity

The comment in tox.ini was updated to remove the ruff mention ("Tools like mypy"), but the source template tox.jinja still says "Tools like ruff and mypy". Since tox.ini is auto-generated from tox.jinja, the next regeneration will revert the tox.ini comment back to mentioning ruff, creating a stale/incorrect reference.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e343398. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix it later it's fine


commands =
; Running `pytest` as an executable suffers from an import error
Expand All @@ -256,16 +254,9 @@ commands =

[testenv:linters]
commands =
ruff check tests sentry_sdk
ruff format --check tests sentry_sdk
mypy sentry_sdk
python scripts/find_raise_from_none.py

[testenv:mypy]
commands =
mypy sentry_sdk

[testenv:ruff]
commands =
ruff check tests sentry_sdk
ruff format --check tests sentry_sdk
11 changes: 1 addition & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ deps =
mypy: -r requirements-linting.txt
mypy: werkzeug<2.3.0
mypy: httpcore[asyncio]
ruff: -r requirements-linting.txt

# === Common ===
py3.8-common: hypothesis
Expand Down Expand Up @@ -1100,11 +1099,10 @@ basepython =
py3.14t: python3.14t

# Python version is pinned here for consistency across environments.
# Tools like ruff and mypy have options that pin the target Python
# Tools like mypy have options that pin the target Python
# version (configured in pyproject.toml), ensuring consistent behavior.
linters: python3.14
mypy: python3.14
ruff: python3.14

commands =
; Running `pytest` as an executable suffers from an import error
Expand All @@ -1114,16 +1112,9 @@ commands =

[testenv:linters]
commands =
ruff check tests sentry_sdk
ruff format --check tests sentry_sdk
mypy sentry_sdk
python scripts/find_raise_from_none.py

[testenv:mypy]
commands =
mypy sentry_sdk

[testenv:ruff]
commands =
ruff check tests sentry_sdk
ruff format --check tests sentry_sdk
26 changes: 26 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading