Skip to content

ci: Enable Ruff import ordering#6270

Merged
alexander-alderman-webb merged 7 commits into
masterfrom
webb/enable-import-ordering
May 15, 2026
Merged

ci: Enable Ruff import ordering#6270
alexander-alderman-webb merged 7 commits into
masterfrom
webb/enable-import-ordering

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb commented May 15, 2026

Description

Add "I" to the [tool.ruff.lint] section in pyproject.toml.

To prevent the introduction of circular imports:

  • Add isort: skip to sentry_sdk/__init__.py.
  • Consolidate LegacySpan import in tracing_utils.py with import at the end of the file.

Run

ruff check --fix

Issues

Reminders

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 43.80s

All tests are passing successfully.

❌ Patch coverage is 61.43%. Project has 14775 uncovered lines.

Files with missing lines (151)
File Patch % Lines
tracing_utils.py 27.17% ⚠️ 579 Missing and 28 partials
langchain.py 3.18% ⚠️ 578 Missing
__init__.py 5.08% ⚠️ 374 Missing
starlette.py 5.60% ⚠️ 371 Missing
client.py 58.97% ⚠️ 272 Missing and 89 partials
__init__.py 3.56% ⚠️ 271 Missing
mcp.py 5.86% ⚠️ 257 Missing
transaction_profiler.py 35.52% ⚠️ 216 Missing and 10 partials
langgraph.py 5.24% ⚠️ 217 Missing
span_processor.py 0.00% ⚠️ 211 Missing
traces.py 36.42% ⚠️ 199 Missing
continuous_profiler.py 43.41% ⚠️ 176 Missing and 17 partials
strawberry.py 8.54% ⚠️ 182 Missing
asgi.py 16.67% ⚠️ 175 Missing and 1 partials
aiohttp.py 24.32% ⚠️ 168 Missing and 2 partials
worker.py 22.22% ⚠️ 168 Missing
aws_lambda.py 16.50% ⚠️ 167 Missing
spark_driver.py 0.00% ⚠️ 166 Missing
sanic.py 9.55% ⚠️ 161 Missing
utils.py 80.74% ⚠️ 99 Missing and 56 partials
wsgi.py 17.74% ⚠️ 153 Missing
ai_client.py 0.00% ⚠️ 148 Missing
cloud_resource_context.py 0.00% ⚠️ 147 Missing
openai.py 90.88% ⚠️ 63 Missing and 71 partials
litestar.py 9.59% ⚠️ 132 Missing
starlite.py 9.03% ⚠️ 131 Missing
envelope.py 41.92% ⚠️ 115 Missing and 9 partials
falcon.py 8.94% ⚠️ 112 Missing
flask.py 12.50% ⚠️ 112 Missing
spotlight.py 28.97% ⚠️ 103 Missing and 8 partials
dramatiq.py 0.00% ⚠️ 110 Missing
arq.py 9.92% ⚠️ 109 Missing
asgi.py 0.00% ⚠️ 109 Missing
beat.py 8.62% ⚠️ 106 Missing
caching.py 0.00% ⚠️ 106 Missing
utils.py 0.00% ⚠️ 103 Missing
utils.py 76.22% ⚠️ 68 Missing and 34 partials
quart.py 16.39% ⚠️ 102 Missing
anthropic.py 86.68% ⚠️ 59 Missing and 42 partials
otlp.py 0.00% ⚠️ 101 Missing
models.py 0.00% ⚠️ 101 Missing
templates.py 0.00% ⚠️ 100 Missing
agent_run.py 0.00% ⚠️ 100 Missing
gcp.py 0.00% ⚠️ 98 Missing
sessions.py 27.82% ⚠️ 96 Missing
_span_batcher.py 22.76% ⚠️ 95 Missing
tornado.py 14.41% ⚠️ 95 Missing
pyramid.py 13.76% ⚠️ 94 Missing
_wsgi_common.py 29.01% ⚠️ 93 Missing
bottle.py 11.43% ⚠️ 93 Missing
logging.py 55.06% ⚠️ 80 Missing and 13 partials
stdlib.py 60.51% ⚠️ 77 Missing and 15 partials
__init__.py 0.00% ⚠️ 92 Missing
agent_run.py 7.14% ⚠️ 91 Missing
sqlalchemy.py 10.00% ⚠️ 90 Missing
middleware.py 0.00% ⚠️ 90 Missing
utils.py 14.56% ⚠️ 88 Missing
runner.py 0.00% ⚠️ 88 Missing
boto3.py 13.13% ⚠️ 86 Missing
beam.py 0.00% ⚠️ 84 Missing
loguru.py 11.58% ⚠️ 84 Missing
ray.py 0.00% ⚠️ 84 Missing
__init__.py 4.55% ⚠️ 84 Missing
tools.py 0.00% ⚠️ 82 Missing
invoke_agent.py 0.00% ⚠️ 82 Missing
session.py 15.56% ⚠️ 76 Missing
clickhouse_driver.py 17.39% ⚠️ 76 Missing
pyreqwest.py 0.00% ⚠️ 76 Missing
httpx.py 41.67% ⚠️ 70 Missing and 3 partials
pure_eval.py 0.00% ⚠️ 73 Missing
rq.py 15.12% ⚠️ 73 Missing
ariadne.py 14.46% ⚠️ 71 Missing
gql.py 10.13% ⚠️ 71 Missing
utils.py 16.67% ⚠️ 70 Missing
server.py 0.00% ⚠️ 69 Missing
_batcher.py 37.38% ⚠️ 67 Missing and 1 partials
__init__.py 9.33% ⚠️ 68 Missing
graphene.py 12.99% ⚠️ 67 Missing
transactions.py 0.00% ⚠️ 67 Missing
_queue.py 26.67% ⚠️ 66 Missing
api.py 59.26% ⚠️ 66 Missing
__init__.py 66.67% ⚠️ 61 Missing and 5 partials
huey.py 17.72% ⚠️ 65 Missing
_asgi_common.py 13.70% ⚠️ 63 Missing
_async_common.py 0.00% ⚠️ 63 Missing
chalice.py 16.18% ⚠️ 57 Missing
spark_worker.py 0.00% ⚠️ 56 Missing
client.py 0.00% ⚠️ 55 Missing
monitoring.py 39.29% ⚠️ 51 Missing and 1 partials
client.py 0.00% ⚠️ 52 Missing
caches.py 17.46% ⚠️ 52 Missing
gnu_backtrace.py 0.00% ⚠️ 51 Missing
socket.py 0.00% ⚠️ 50 Missing
views.py 0.00% ⚠️ 50 Missing
_sync_common.py 19.35% ⚠️ 50 Missing
invoke_agent.py 0.00% ⚠️ 47 Missing
signals_handlers.py 0.00% ⚠️ 44 Missing
server.py 0.00% ⚠️ 43 Missing
utils.py 22.22% ⚠️ 42 Missing and 1 partials
executing.py 0.00% ⚠️ 38 Missing
serializer.py 86.02% ⚠️ 26 Missing and 11 partials
litellm.py 87.92% ⚠️ 18 Missing and 16 partials
queries.py 21.43% ⚠️ 33 Missing
sys_exit.py 0.00% ⚠️ 32 Missing
integration.py 0.00% ⚠️ 32 Missing
launchdarkly.py 0.00% ⚠️ 31 Missing
threading.py 76.84% ⚠️ 22 Missing and 8 partials
cohere.py 88.10% ⚠️ 15 Missing and 14 partials
trytond.py 0.00% ⚠️ 29 Missing
scrubber.py 73.61% ⚠️ 19 Missing and 9 partials
error_tracing.py 0.00% ⚠️ 27 Missing
tools.py 0.00% ⚠️ 27 Missing
utils.py 0.00% ⚠️ 27 Missing
ai_client.py 16.67% ⚠️ 25 Missing
redis_cluster.py 26.47% ⚠️ 25 Missing
_werkzeug.py 14.29% ⚠️ 24 Missing
typer.py 0.00% ⚠️ 24 Missing
execute_tool.py 0.00% ⚠️ 24 Missing
_compat.py 41.03% ⚠️ 23 Missing
statsig.py 0.00% ⚠️ 23 Missing
logger.py 43.59% ⚠️ 22 Missing
decorator.py 37.14% ⚠️ 22 Missing
_log_batcher.py 0.00% ⚠️ 21 Missing
attachments.py 27.59% ⚠️ 21 Missing
unraisablehook.py 0.00% ⚠️ 21 Missing
execute_tool.py 0.00% ⚠️ 21 Missing
monitor.py 80.82% ⚠️ 14 Missing and 6 partials
streaming.py 91.94% ⚠️ 5 Missing and 15 partials
feature_flags.py 51.28% ⚠️ 19 Missing
unleash.py 0.00% ⚠️ 19 Missing
atexit.py 56.25% ⚠️ 14 Missing and 1 partials
excepthook.py 56.25% ⚠️ 14 Missing and 1 partials
redis.py 25.00% ⚠️ 15 Missing
_init_implementation.py 45.83% ⚠️ 13 Missing
types.py 0.00% ⚠️ 12 Missing
dedupe.py 80.00% ⚠️ 8 Missing and 3 partials
api.py 37.50% ⚠️ 10 Missing
handoff.py 0.00% ⚠️ 10 Missing
metrics.py 47.06% ⚠️ 9 Missing
_openai_completions_api.py 87.10% ⚠️ 4 Missing and 5 partials
__init__.py 72.41% ⚠️ 8 Missing and 1 partials
utils.py 33.33% ⚠️ 8 Missing
_metrics_batcher.py 63.16% ⚠️ 7 Missing
debug.py 91.30% ⚠️ 2 Missing and 2 partials
__init__.py 20.00% ⚠️ 4 Missing
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 40.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
modules.py 94.12% ⚠️ 1 Missing and 1 partials
agent_workflow.py 71.43% ⚠️ 2 Missing
argv.py 100.00% ⚠️ 1 partials

Generated by Codecov Action

Comment thread sentry_sdk/__init__.py Outdated
@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review May 15, 2026 09:45
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner May 15, 2026 09:45
Comment thread sentry_sdk/tracing_utils.py Outdated
@alexander-alderman-webb alexander-alderman-webb merged commit 015ff31 into master May 15, 2026
156 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/enable-import-ordering branch May 15, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants