Skip to content

Commit 3974d67

Browse files
committed
revert broken changes to decorators
1 parent 38ce838 commit 3974d67

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

arraycontext/container/traversal.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,9 @@ def rec_map_array_container(
269269

270270

271271
def mapped_over_array_containers(
272-
f: Callable[[Any], Any],
273-
leaf_class: Optional[type] = None) -> Callable[
274-
[ArrayOrContainerT], ArrayOrContainerT]:
272+
f: Callable[[Any], Any]) -> Callable[[ArrayOrContainerT], ArrayOrContainerT]:
275273
"""Decorator around :func:`rec_map_array_container`."""
276-
wrapper = partial(rec_map_array_container, f, leaf_class=leaf_class)
274+
wrapper = partial(rec_map_array_container, f)
277275
update_wrapper(wrapper, f)
278276
return wrapper
279277

@@ -294,13 +292,12 @@ def rec_multimap_array_container(
294292

295293

296294
def multimapped_over_array_containers(
297-
f: Callable[..., Any],
298-
leaf_class: Optional[type] = None) -> Callable[..., Any]:
295+
f: Callable[..., Any]) -> Callable[..., Any]:
299296
"""Decorator around :func:`rec_multimap_array_container`."""
300297
# can't use functools.partial, because its result is insufficiently
301298
# function-y to be used as a method definition.
302299
def wrapper(*args: Any) -> Any:
303-
return rec_multimap_array_container(f, *args, leaf_class=leaf_class)
300+
return rec_multimap_array_container(f, *args)
304301

305302
update_wrapper(wrapper, f)
306303
return wrapper

0 commit comments

Comments
 (0)