Skip to content

Commit

Permalink
InKernelCallable._all_attrs: ordered
Browse files Browse the repository at this point in the history
As requested here:
#886 (comment)
  • Loading branch information
inducer committed Nov 29, 2024
1 parent 64b661d commit 937fd78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loopy/kernel/function_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ def name(self) -> str:

# {{{ hackery to avoid breaking Firedrake

def _all_attrs(self) -> Collection[str]:
def _all_attrs(self) -> Sequence[str]:
dc_attrs = {
fld.name for fld in fields(self)
}
legacy_fields: Collection[str] = getattr(self, "fields", [])
return dc_attrs | set(legacy_fields)
return sorted(dc_attrs | set(legacy_fields))

def copy(self, **kwargs: Any) -> Self:
present_kwargs = {
Expand Down

0 comments on commit 937fd78

Please sign in to comment.