Repository navigation
fix(task): rename Task.get_param_names parameter to include_insignificant - #3478
Open
reginaldalfret wants to merge 1 commit into
Open
reginaldalfret wants to merge 1 commit into
reginaldalfret wants to merge 1 commit into
Conversation
…cant Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
Manishram-ai
approved these changes
Nov 4, 2026
Manishram-ai
left a comment
There was a problem hiding this comment.
Nice, keeping the old keyword working with a warning is a good call. Positional calls like get_param_names(True) still behave the same, and nothing in luigi itself passes the old keyword.
Two small things, both optional:
- The deprecated argument can also be passed positionally now, so
get_param_names(False, True)returns the insignificant params too. Making it keyword-only would avoid that:def get_param_names(cls, include_insignificant=False, *, include_significant=None). - If both are passed, the old one wins, so
include_insignificant=True, include_significant=Falsereturns only the significant ones. ATypeErrorwhen both are given could be clearer.
Also, #3168 does the same rename without the deprecation path, so one of the two can probably be closed.
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.
Summary
Fixes #3167
\Task.get_param_names\ had a confusing parameter named \include_significant=False. By default, only significant parameters were returned. Setting \include_significant=True\ caused insignificant parameters to be included in the output as well (\if include_significant or p.significant), making the parameter name opposite to its actual behavior.
This change:
Testing