Skip to content
Open
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
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# ruff-pre-commit is not using tool.ruff.include setting,
# so `files` need to be specified here.
# https://github.com/astral-sh/ruff-pre-commit/issues/71
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.2
rev: v0.14.10
hooks:
- id: ruff-check
args: [--fix]
files: ^(sentry_sdk/|tests/)
- id: ruff-format
files: ^(sentry_sdk/|tests/)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ ignore_missing_imports = true
# Target Python 3.7+ (minimum version supported by ruff)
target-version = "py37"

# Include files and directories
include = ["sentry_sdk/**/*.py", "tests/**/*.py"]

# Exclude files and directories
extend-exclude = [
"*_pb2.py", # Protocol Buffer files (covers all pb2 files including grpc_test_service_pb2.py)
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,5 @@ commands =

[testenv:linters]
commands =
ruff check tests sentry_sdk
ruff format --check tests sentry_sdk
pre-commit run --all-files
mypy sentry_sdk
Comment on lines +927 to 928

This comment was marked as outdated.

Copy link
Author

Choose a reason for hiding this comment

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

I believe this is okay. Explicitly saying that files shouldn't be changed doesn't yield a benefit on CI.