Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constraint form clean methods validation to only forms within the project #54

Merged
merged 11 commits into from
Dec 25, 2024

Conversation

Naggafin
Copy link
Contributor

this modification constrains the default behavior for checking Form classes' clean methods to only those forms that exist within the project. forms which would fail this test but exist in third-party libraries are ignored. I added a configuration to enable strict validation if one would desire it.

a practical use case is django-oscar, which does indeed contain a form that fails the form clean validity check, thus breaking the project through third-party code, which is something we probably want to avoid.

ps: don't hate me but I reformatted with isort and ruff/black. it seemed nice to do ;(

@boxed
Copy link
Owner

boxed commented Dec 18, 2024

I can't accept this change due to the reformat. It's unreviewable. If you propose to reformat, you need to have a separate commit for the reformat, separate from the reformat.

@Naggafin
Copy link
Contributor Author

okilydokily. I have undone the formatting and stuck with the basics. this has been formatted fully in another branch called blacked that I can PR if you like (really, isort and black make maintainability a lot easier by enforcing standard stylization imho).

…ks (only applies to form checking right now)
@boxed boxed merged commit 2537900 into boxed:master Dec 25, 2024
1 check passed
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.

3 participants