feat(ci): Migrate black, isort, pyupgrade, and most of flake8 to ruff#108010
feat(ci): Migrate black, isort, pyupgrade, and most of flake8 to ruff#108010
black, isort, pyupgrade, and most of flake8 to ruff#108010Conversation
… in the `sentry` repo
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Aci
Admin
Agent
Agents
Ai Conversations
Ai Insights
Autofix
Autopilot
Billing
Cells
Ci
Code Review
Conversations
Copilot
Core
Crons Detector Schedule Preview
Dashboards
Dynamic Grouping
Dynamic Sampling
Eco
Explore
Grouping
Infra
Integrations
Issue Details
Issues
Js Loader
Lint
Llm Detection
Notifications
Oauth
Objectstore
Occurrences On Eap
Onboarding
Preprod
Replay
Replays
Search Agent
Seer
Seer Explorer
Sentry Apps
Settings
Spans
Spans Buffer
Toolbar
Trace
Tracemetrics
Ui
Uptime
Uptime Assertion Failure Data
Webhook
Other
Bug Fixes 🐛Aci
Agent Insights
Agents
Ai Conversations
Ai Insights
Alerts
Auth
Autofix
Autopilot
Billing
Cells
Code Mappings
Code Review
Codeowners
Cursor
Dashboards
Data Forwarding
Eap
Explore
Explorer
Forms
Github Copilot
Grouping
Infra
Insights
Issue Details
Issues
Lint
Notifications
Onboarding
Preprod
Releases
Replay
Seer
Settings
Span Buffer
Spans Migration
Stories
Tests
Top Issues
Trace Waterfall
Tracemetrics
Typing
Ui
Uptime
Users
Other
Documentation 📚
Internal Changes 🔧Aci
Agent
Agents
Alerts
Api
Autofix
Autopilot
Billing
Cells
Code Review
Code Review
Codeowners
Conversations
Cross Event
Dashboards
Deps
Dynamic Sampling
Eslint
Explorer
Forms
Grouping
Infra
Insights
Integrations
Issues
Llm Detection
Open Periods
Ownership
Preprod
Promotions
Relay
Replay
Routes
Scraps
Seer
Sentry Apps
Slack
Span Buffer
Spans
Stories
Tests
Theme
Tracemetrics
Ui
Uptime
Workflow Engine
Other
Other
Plus 102 more 🤖 This preview updates automatically when you update the PR. |
|
sorry for the ping y'all -- no action needed from any other teams |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| "fields": [ | ||
| "span.op", | ||
| "span.duration" "timestamp", | ||
| "span.durationtimestamp", |
There was a problem hiding this comment.
Ruff collapsed implicit string concat hiding missing comma
Low Severity
The ruff formatter collapsed "span.duration" "timestamp" (two adjacent string literals — Python implicit string concatenation) into "span.durationtimestamp". The original code was missing a comma between the two strings, which should be separate fields entries: "span.duration", "timestamp". This is confirmed by comparing with the other example in the same file (line 58-61), which has "span.op" and "timestamp" as separate list items, and by the rest of the codebase where span.duration is always a standalone field name. While the runtime behavior is unchanged (implicit concat already produced the wrong value), the formatting now makes the bug look intentional.
There was a problem hiding this comment.
real pre-existing bug, will fix in follow-up
Follow-up to #108010. Ignores the reformatting diff from the above PR in Git Blame.


Follow-up to https://github.com/getsentry/getsentry/pull/19255/.
Migrating
black,isort,pyupgrade, and most offlake8toruff.ruffis significantly faster, it's a single unified tool, it's already an industry standard, and we can count on it improving/evolving at a much faster rate than these other tools.View this commit and this commit for the actual updates. There are also some rule violations manually fixed in this commit. The other changes are just the results of applying
rufflinting & formatting to the codebase. Relevant files:pyproject.toml(diff)uv.lock(diff)setup.cfg(diff).pre-commit-config.yaml(diff).vscode/extensions.json(diff).vscode/settings.json(diff)Follow-up items:
.git-blame-ignore-revsso thatgit blamewill skip over the formatting changes when determining the original author of code (PR link)