Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/10583.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Removed support for ``nmp.NaN`` alias for ``numpy.NaN`` being recognized in ':ref:`nan-comparison`'. Use ``np`` or ``numpy`` instead.

Refs #10583
2 changes: 1 addition & 1 deletion pylint/checkers/base/comparison_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _is_float_nan(node: nodes.NodeNG) -> bool:
def _is_numpy_nan(node: nodes.NodeNG) -> bool:
match node:
case nodes.Attribute(attrname="NaN", expr=nodes.Name(name=name)):
return name in {"numpy", "nmp", "np"}
return name in {"numpy", "np"}
return False

def _is_nan(node: nodes.NodeNG) -> bool:
Expand Down
Loading