-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
nan-comparison (PLW0177) doesn’t detect float calls that produce NaN if their arguments contain positive or negative signs or white space. Compare verbose-decimal-constructor (FURB157), which does detect them.
$ cat >plw0177.py <<'# EOF'
float("\n+nAn\xA0") == float("-NaN ")
# EOF
$ ruff --isolated check plw0177.py --select PLW0177 --preview
All checks passed!Version
ruff 0.11.13 (5faf72a 2025-06-05)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule