Skip to content

Commit 800aed5

Browse files
Fiddle-Config Teamcopybara-github
authored andcommitted
inline partial
PiperOrigin-RevId: 631644170
1 parent 20925d8 commit 800aed5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fiddle/_src/experimental/auto_config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ def _make_partial(partial_cls, buildable_or_callable, *args, **kwargs):
566566
f'arguments can be supplied to the outer call. Got: {args!r}'
567567
)
568568
return copying.copy_with(buildable_or_callable, **kwargs)
569+
elif (
570+
isinstance(buildable_or_callable, AutoConfig)
571+
and buildable_or_callable.always_inline
572+
):
573+
return cast_lib.cast(
574+
partial_cls, buildable_or_callable.as_buildable(*args, **kwargs)
575+
)
569576
else:
570577
return partial_cls(buildable_or_callable, *args, **kwargs)
571578

0 commit comments

Comments
 (0)