[Junie]: Junie: BaseInlineFormSet does not support "auto_id"#7
Open
junie-eap[bot] wants to merge 1 commit intomainfrom
Open
[Junie]: Junie: BaseInlineFormSet does not support "auto_id"#7junie-eap[bot] wants to merge 1 commit intomainfrom
junie-eap[bot] wants to merge 1 commit intomainfrom
Conversation
changes from the task: #5
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.
📌 Hey! This PR was made for you with Junie, the coding agent by JetBrains Early Access Preview
It's still learning, developing, and might make mistakes. Please make sure you review the changes before you accept them.
We’d love your feedback — join our Discord to share bugs, ideas: here.
📝 Original Issue Description
BaseInlineFormSet.init does not accept the auto_id argument, unlike its ancestors. Furthmore, its parent BaseModelFormSet takes **kwargs and passes them along.
I can't think of a good reason for this omission/difference. I've attached a small patch to "match" BaseInlineFormSet.init with BaseModelFormSet.init. The patch puts the "new" auto_id argument last in order to maximize backwards compatibility (the order is different for BaseModelFormSet).
Arguably, both prefix and auto_id could be removed from the explicit arg list since they're just passed along (in both BaseModelFormSet and BaseInlineFormSet).
Made BaseInlineFormSet explicitly support auto_id, for consistency with the prefix argument and superclasses.
Trac ticket number
ticket-14688
Branch description
BaseInlineFormSet.init does not explicitly accept the auto_id argument, unlike its ancestor classes, and thus inconsistent with its sibling argument prefix.
This is picking up word already done by Victor Andrée and Tobias Kunze, with a longer and more specific test. The ticket was closed by mistake and then the ticket was reopened.
This is one of two approaches, the other would be to make prefix not an explicit argument to match auto_id, but that would be a breaking change.
No idea if anyone still wants this or cares 14 years after first opening, but this should hopefully push the ticket forward at least.
📊 Junie Summary
The
BaseInlineFormSet.__init__method was updated to explicitly accept theauto_idparameter, aligning its interface with that of its parent classBaseModelFormSet. A new test was created to verify this functionality, and while running tests, the implementation passed, indicating that the changes were successful and error-free.