Skip to content

Ensure pending suppression diagnostics are reported#23242

Merged
amyreese merged 3 commits intomainfrom
amy/suppression-fix
Feb 12, 2026
Merged

Ensure pending suppression diagnostics are reported#23242
amyreese merged 3 commits intomainfrom
amy/suppression-fix

Conversation

@amyreese
Copy link
Member

@amyreese amyreese commented Feb 12, 2026

Factor out the logic to submit pending suppression diagnostics, and
make sure it's called after passing through all valid suppressions.
This fixes a bug where diagnostics for the last valid suppression
don't get reported.

Fix #23235

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 12, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@amyreese amyreese added the suppression Related to supression of violations e.g. noqa label Feb 12, 2026
@amyreese amyreese changed the title Ensure pending suppression diagnostics are registered Ensure pending suppression diagnostics are reported Feb 12, 2026
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

This also makes sense to me, but I think we should add a regression test or two.

@amyreese amyreese force-pushed the amy/suppression-fix branch from 3ef1f99 to 6d68c59 Compare February 12, 2026 19:49
@amyreese amyreese merged commit 55d06c8 into main Feb 12, 2026
42 checks passed
@amyreese amyreese deleted the amy/suppression-fix branch February 12, 2026 20:21
carljm added a commit that referenced this pull request Feb 14, 2026
* main: (209 commits)
  [ty] Defer base inference for functional `type(...)` classes (#22792)
  flake8-executable: allow global flags in uv shebangs (EXE003) (#22582)
  [ty] Add `replace-imports-with-any` option (#23122)
  Update html comments in mdtests (#23269)
  Apply ruff formatting to mdtests (#22935)
  [ty] Exclude test-related symbols from non-first-party packages in auto-import completions
  [ty] Refactor `CursorTest` helper to support site-packages
  [ty] Qualify inlay hint edit symbol when possibly referencing another variable (#23265)
  [ty] Avoid `UnionBuilder` overhead when creating a new union from the filtered elements of an existing union (#22352)
  [ty] Refactor TypedDict key assignment validation (#23262)
  [ty] Improve Python environment path documentation (#23256)
  [ty] loop control flow analysis using loop header definitions
  Prepare for 0.15.1 (#23253)
  Remove docker-run-action (#23254)
  [ty] Allow discovering dependencies in system Python environments (#22994)
  Ensure pending suppression diagnostics are reported (#23242)
  [`isort`] support for configurable import section heading comments (#23151)
  [ty] Fix method calls on subclasses of `Any` (#23248)
  [ty] Fix bound method access on `None` (#23246)
  Make range suppression test snapshot actually useful (#23251)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

suppression Related to supression of violations e.g. noqa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Range suppression diagnostics not being surfaced

2 participants