ruff/crates/ruff_linter/src
GiGaGon 580577e667
[`refurb`] Make example error out-of-the-box (`FURB157`) (#19695)
## Summary

Part of #18972

This PR makes [verbose-decimal-constructor
(FURB157)](https://docs.astral.sh/ruff/rules/verbose-decimal-constructor/#verbose-decimal-constructor-furb157)'s
example error out-of-the-box.

[Old example](https://play.ruff.rs/0930015c-ad45-4490-800e-66ed057bfe34)
```py
Decimal("0")
Decimal(float("Infinity"))
```

[New example](https://play.ruff.rs/516e5992-322f-4203-afe7-46d8cad53368)
```py
from decimal import Decimal

Decimal("0")
Decimal(float("Infinity"))
```

Imports were also added to the "Use Instead" section.
2025-08-01 12:55:48 -05:00
..
checkers Add `Checker::context` method, deduplicate Unicode checks (#19609) 2025-07-29 16:07:55 -04:00
comments Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
cst [`ruff`] Fix false positives and negatives in `RUF010` (#18690) 2025-06-26 17:53:52 +02:00
docstrings [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
fix Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
importer fix missing-required-imports introducing syntax error after dosctring ending with backslash (#19505) 2025-07-30 12:12:46 -04:00
linter [`pylint`] Detect more exotic NaN literals in `PLW0177` (#18630) 2025-06-19 11:05:06 +00:00
message Fix link: unused_import.rs (#19648) 2025-08-01 08:47:52 +00:00
registry Remove `Message::to_rule` (#18447) 2025-06-05 12:48:29 -04:00
rules [`refurb`] Make example error out-of-the-box (`FURB157`) (#19695) 2025-08-01 12:55:48 -05:00
settings [`flake8-type-checking`, `pyupgrade`, `ruff`] Add `from __future__ import annotations` when it would allow new fixes (`TC001`, `TC002`, `TC003`, `UP037`, `RUF013`) (#19100) 2025-07-16 08:50:52 -04:00
snapshots [semantic-syntax-tests] `IrrefutableCasePattern`, `SingleStarredAssignment`, `WriteToDebug`, `InvalidExpression` (#17748) 2025-05-09 14:54:05 -04:00
codes.rs [`flake8-use-pathlib`] Add autofix for `PTH101`, `PTH104`, `PTH105`, `PTH121` (#19404) 2025-07-23 12:13:43 -04:00
directives.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
doc_lines.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
fs.rs Avoid generating diagnostics with per-file ignores (#18801) 2025-06-20 13:33:09 -04:00
lib.rs Combine `OldDiagnostic` and `Diagnostic` (#19053) 2025-07-03 13:01:09 -04:00
line_width.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
linter.rs Add `LinterContext::settings` to avoid passing separate settings (#19608) 2025-07-29 08:13:22 -04:00
locator.rs [ty] Fix empty spans following a line terminator and unprintable character spans in diagnostics (#19535) 2025-07-29 08:25:58 -04:00
logging.rs Combine `OldDiagnostic` and `Diagnostic` (#19053) 2025-07-03 13:01:09 -04:00
noqa.rs Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
package.rs Detect empty implicit namespace packages (#14236) 2024-11-09 22:03:34 -05:00
packaging.rs Nested namespace packages support (#10541) 2024-03-24 22:53:32 -04:00
preview.rs [`flake8-commas`] Add support for trailing comma checks in type parameter lists (`COM812`,`COM819`) (#19390) 2025-07-28 10:53:04 -04:00
pyproject_toml.rs Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
registry.rs Apply fix availability and applicability when adding to `DiagnosticGuard` and remove `NoqaCode::rule` (#18834) 2025-06-24 10:08:36 -04:00
renamer.rs Add a `ViolationMetadata::rule` method (#18234) 2025-05-28 09:27:09 -04:00
rule_redirects.rs [`flake8-bandit`] Move `unsafe-markup-use` from `RUF035` to `S704` (#15957) 2025-03-13 15:37:37 +01:00
rule_selector.rs Apply fix availability and applicability when adding to `DiagnosticGuard` and remove `NoqaCode::rule` (#18834) 2025-06-24 10:08:36 -04:00
source_kind.rs Update MSRV to 1.85 and toolchain to 1.87 (#18126) 2025-05-16 09:19:55 +02:00
test.rs [`pyupgrade`] Prevent infinite loop with `I002` (`UP010`, `UP035`) (#19413) 2025-07-31 15:17:27 -04:00
text_helpers.rs Handle non-printable characters in diff view (#11687) 2024-06-08 06:22:03 +00:00
upstream_categories.rs Fix pylint upstream categories not showing in docs (#10441) 2024-03-18 01:27:39 +00:00
violation.rs Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00