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

Extend bad-dunder-method-name to permit __html__ #7478

Closed
jaap3 opened this issue Sep 18, 2023 · 2 comments · Fixed by #7492
Closed

Extend bad-dunder-method-name to permit __html__ #7478

jaap3 opened this issue Sep 18, 2023 · 2 comments · Fixed by #7492
Labels
accepted Ready for implementation

Comments

@jaap3
Copy link
Contributor

jaap3 commented Sep 18, 2023

The __html__ dunder method is used by Jinja2, Django and other frameworks (?) to return the "safe" html representation of an object.

There doesn't seem to be an equivalent of pylint's good-dunder-names in ruff. Would it be acceptable to add __html__ to the allow list?

@jaap3
Copy link
Contributor Author

jaap3 commented Sep 18, 2023

I'm willing to make a PR if this is accepted

@charliermarsh
Copy link
Member

Yes that seems reasonable. PR appreciated!

@charliermarsh charliermarsh added the accepted Ready for implementation label Sep 18, 2023
dhruvmanila pushed a commit that referenced this issue Sep 18, 2023
## Summary

Fixes #7478

## Test Plan

`cargo test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants