Skip to content

[Junie]: Junie: BaseInlineFormSet does not support "auto_id"#7

Open
junie-eap[bot] wants to merge 1 commit intomainfrom
junie-issue-5
Open

[Junie]: Junie: BaseInlineFormSet does not support "auto_id"#7
junie-eap[bot] wants to merge 1 commit intomainfrom
junie-issue-5

Conversation

@junie-eap
Copy link
Copy Markdown

@junie-eap junie-eap bot commented Apr 28, 2025

📌 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

  Issue task:
  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.

  Issue comments:
  No comments yet

📊 Junie Summary

The BaseInlineFormSet.__init__ method was updated to explicitly accept the auto_id parameter, aligning its interface with that of its parent class BaseModelFormSet. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants