-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome
Description
Summary
The fix for verbose-decimal-constructor
(FURB157) panics when the minus sign in float("-nan")
is represented by an escape sequence.
$ cat >furb157.py <<'# EOF'
from decimal import Decimal
Decimal(float("\x2dnan"))
# EOF
$ ruff --isolated check --preview --select FURB157 furb157.py --diff
error: Panicked while linting furb157.py: This indicates a bug in Ruff. If you could open an issue at:
https://github.com/astral-sh/ruff/issues/new?title=%5BLinter%20panic%5D
...with the relevant file contents, the `pyproject.toml` settings, and the following stack trace, we'd be very appreciative!
panicked at
crates/ruff_linter/src/rules/refurb/rules/verbose_decimal_constructor.rs:181:58:
called `Option::unwrap()` on a `None` value
Backtrace: 0: __mh_execute_header
1: __mh_execute_header
2: __mh_execute_header
3: __mh_execute_header
4: __mh_execute_header
5: __mh_execute_header
6: __mh_execute_header
7: __mh_execute_header
8: __mh_execute_header
9: __mh_execute_header
10: __mh_execute_header
11: __mh_execute_header
12: __mh_execute_header
13: __mh_execute_header
14: __mh_execute_header
15: __mh_execute_header
16: __mh_execute_header
17: __mh_execute_header
18: __mh_execute_header
19: __mh_execute_header
20: __mh_execute_header
21: __mh_execute_header
22: __mh_execute_header
23: __mh_execute_header
24: __mh_execute_header
25: __mh_execute_header
26: __mh_execute_header
27: __mh_execute_header
Version
ruff 0.11.0 (2cd25ef 2025-03-14)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome