Skip to content

Fix unreliable floating point equality (RUF069)#350

Merged
inducer merged 2 commits intoinducer:mainfrom
alexfikl:fix-ruff
Feb 13, 2026
Merged

Fix unreliable floating point equality (RUF069)#350
inducer merged 2 commits intoinducer:mainfrom
alexfikl:fix-ruff

Conversation

@alexfikl
Copy link
Collaborator

This just adds some ignores since both places seemed to want to compare actual equality.

@alexfikl
Copy link
Collaborator Author

Not quite sure where the pyright errors came from (new immutabledict?), but they seem ignorable:

 /home/runner/work/arraycontext/arraycontext/arraycontext/impl/pytato/outline.py:102:12 - error: Type "immutabledict[tuple[SerializationKey, ...], object]" is not assignable to return type "immutabledict[tuple[SerializationKey, ...], Array]"
  "immutabledict[tuple[SerializationKey, ...], object]" is not assignable to "immutabledict[tuple[SerializationKey, ...], Array]"
    Type parameter "_V@immutabledict" is covariant, but "object" is not a subtype of "Array"
      "object" is not assignable to "Array" (reportReturnType)
Error: Type "immutabledict[tuple[SerializationKey, ...], object]" is not assignable to return type "immutabledict[tuple[SerializationKey, ...], Array]"
  "immutabledict[tuple[SerializationKey, ...], object]" is not assignable to "immutabledict[tuple[SerializationKey, ...], Array]"
    Type parameter "_V@immutabledict" is covariant, but "object" is not a subtype of "Array"
      "object" is not assignable to "Array" (reportReturnType)
/home/runner/work/arraycontext/arraycontext/arraycontext/impl/pytato/outline.py:194:16 - warning: Return type, "immutabledict[str, Unknown]", is partially unknown (reportUnknownVariableType)
Warning: Return type, "immutabledict[str, Unknown]", is partially unknown (reportUnknownVariableType)
/home/runner/work/arraycontext/arraycontext/arraycontext/impl/pytato/outline.py:194:30 - warning: Argument type is partially unknown
  Argument corresponds to parameter "map" in function "__new__"
  Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)
Warning: Argument type is partially unknown
  Argument corresponds to parameter "map" in function "__new__"
  Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)

@inducer inducer merged commit 60fa10d into inducer:main Feb 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants