Conversation
Contributor
|
this was otherwise untested; deleting the code that produced the summary didn't cause anything to fail
note that I removed the `show_fix_status` setting because these errors don't have fixes, so it doesn't change the snapshots
I'm always a bit wary of deleting tests, but I believe these are well-covered by the tests in `full.rs` and `concise.rs` in `ruff_db`. Similarly, the helper for generating notebook diagnostics has been adapted to `ruff_db` too.
we conver to an Applicability anyway, so it's a bit easier to do it up front, like we do for the other output formats
since these names were already taken, I moved the setters to `with_*` this allows fetching the values when setting up the GroupedEmitter even though it doesn't use the rest of the rendering infrastructure
3c2f9d2 to
393803a
Compare
MichaReiser
approved these changes
Sep 29, 2025
3 tasks
dcreager
added a commit
that referenced
this pull request
Sep 30, 2025
* main: (21 commits) [ty] Literal promotion refactor (#20646) [ty] Add tests for nested generic functions (#20631) [`cli`] Add conflict between `--add-noqa` and `--diff` options (#20642) [ty] Ensure first-party search paths always appear in a sensible order (#20629) [ty] Use `typing.Self` for the first parameter of instance methods (#20517) [ty] Remove unnecessary `parsed_module()` calls (#20630) Remove `TextEmitter` (#20595) [ty] Use fully qualified names to distinguish ambiguous protocols in diagnostics (#20627) [ty] Ecosystem analyzer: relax timeout thresholds (#20626) [ty] Apply type mappings to functions eagerly (#20596) [ty] Improve disambiguation of class names in diagnostics (#20603) Add the *The Basics* title back to CONTRIBUTING.md (#20624) [`playground`] Fix quick fixes for empty ranges in playground (#20599) Update dependency ruff to v0.13.2 (#20622) [`ruff`] Fix minor typos in doc comments (#20623) Update dependency PyYAML to v6.0.3 (#20621) Update cargo-bins/cargo-binstall action to v1.15.6 (#20620) Fixed documentation for try_consider_else (#20587) [ty] Use `Top` materializations for `TypeIs` special form (#20591) [ty] Simplify `Any | (Any & T)` to `Any` (#20593) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #20443 (comment) by factoring out the
matchon the ruff output format in a way that should be reusable by the formatter.I didn't think this was going to work at first, but the fact that the config holds options that apply only to certain output formats works in our favor here. We can set up a single config for all of the output formats and then use
try_fromto convert theOutputFormatto aDiagnosticFormatlater.Test Plan
Existing tests, plus a few new ones to make sure relocating the
SHOW_FIX_SUMMARYrendering worked, that was untested before. I deleted a bunch of test code along with thetextmodule, but I believe all of it is now well-covered by thefullandconcisetests inruff_db.I also merged this branch into #20443 locally and made sure that the API actually helps.
render_diagnosticsdropped in perfectly and passed the tests there too.