Fix mutable_flow test flow passing a stale second argument to extract_step_decorator_from_decospec - #3358
Open
Anai-Guo wants to merge 1 commit into
Open
Conversation
…rator_from_decospec
`extract_step_decorator_from_decospec` takes a single `decospec` argument, but
both call sites in the `mutable_flow` test flow still pass a second `{}`
positional, so `ModifyFlow`/`ModifyFlow2` raise TypeError as soon as the flow
is mutated.
Both production call sites already pass one argument.
Contributor
Greptile SummaryThis PR fixes the mutable-flow configuration test by removing obsolete second arguments from two calls to
Confidence Score: 5/5The PR appears safe to merge; the narrowly scoped changes correct two stale test call sites without altering behavior beyond preventing their argument-count errors. Both modified calls now match the parser’s single-argument signature while retaining the same inputs, tuple unpacking, and subsequent decorator mutation logic.
|
| Filename | Overview |
|---|---|
| test/test_config/mutable_flow.py | Both stale two-argument calls are correctly updated to use the helper’s existing single-argument interface, with no issues identified. |
Reviews (1): Last reviewed commit: "fix(test_config): drop the stale second ..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
extract_step_decorator_from_decospecaccepts exactly one argument(
metaflow/decorators.py:692):but both call sites in the
mutable_flowtest flow still pass a secondpositional
{}:Both are reached from a
FlowMutator.mutate(), which runs at flow-definitiontime, so
mutable_flow.pyraisesTypeError: extract_step_decorator_from_decospec() takes 1 positional argument but 2 were givenbefore any step executes. The flowis registered as a test case in
test/test_config/test.py:96.The two call sites in library code already pass a single argument, which is what
makes this a stale-caller bug rather than a signature question:
metaflow/decorators.py:768metaflow/user_decorators/mutable_step.py:340test/test_config/mutable_flow.py:61test/test_config/mutable_flow.py:110Binding the real upstream signature against all four call sites, with the two
library callers as the control group:
This PR drops the extra
{}at both sites so the test flow matches thesignature and the two library callers. Nothing else changes — the return value
is still unpacked as
(step_deco, has_args_kwargs), exactly asmutable_step.py:340does.🤖 Generated with Claude Code