Skip to content

Commit

Permalink
only use __qualname__ if available, otherwise old way
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray authored Dec 17, 2024
1 parent f1b5d31 commit bbbaa96
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/dask_awkward/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,15 @@ def __init__(self, the_fn, arg_repackers, kwarg_repacker, arg_lens_for_repackers
self.arg_lens_for_repackers = arg_lens_for_repackers

def __repr__(self):
return f"{self.fn.__qualname__}-repacked"
if hasattr(self.fn, "__qualname__")
return f"{self.fn.__qualname__}-repacked"
return (
repr(self.fn)
.replace("<", "")
.replace(">", "")
.replace("function ", "")
.replace("built-in ", "")
) + "-repacked"

def _repack(self, *args_deps_expanded):
"""This packing function receives a list of strictly
Expand Down

0 comments on commit bbbaa96

Please sign in to comment.