ruff/crates/ruff_linter
Brent Westbrook b21ac567e1
[refurb] Add a note about float literal handling (FURB157) (#18615)
Summary
--

Updates the rule docs to explicitly state how cases like
`Decimal("0.1")` are handled (not affected) because the discussion of
"float casts" referring to values like `nan` and `inf` is otherwise a
bit confusing.

These changes are based on suggestions from @AlexWaygood on Notion, with
a slight adjustment to use 0.1 instead of 0.5 since it causes a more
immediate issue in the REPL:

```pycon
>>> from decimal import Decimal
>>> Decimal(0.5) == Decimal("0.5")
True
>>> Decimal(0.1) == Decimal("0.1")
False
```

Test plan
--

N/a

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-06-10 16:09:08 -04:00
..
resources [flake8-pyi] Avoid syntax error in the case of starred and keyword arguments (PYI059) (#18611) 2025-06-10 12:27:06 -04:00
src [refurb] Add a note about float literal handling (FURB157) (#18615) 2025-06-10 16:09:08 -04:00
Cargo.toml Bump 0.11.13 (#18484) 2025-06-05 15:18:38 -05:00