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

Add pre-commit hook for django-upgrade #26

Open
SukiCZ opened this issue Mar 4, 2025 · 0 comments · May be fixed by #27
Open

Add pre-commit hook for django-upgrade #26

SukiCZ opened this issue Mar 4, 2025 · 0 comments · May be fixed by #27

Comments

@SukiCZ
Copy link

SukiCZ commented Mar 4, 2025

I believe this repo is widely used as a hands-on experience with documentation, hence the repo should follow best Django (and Python) practicies.

One way to up 🆙 the best practicies is to follow django-upgrade (and pyupgrade) pre-commit hook. Pyupgrade is managed by Ruff PU rules

Using django-upgrade on current codebase would result in only changing request.META["HTTP_REFERER"] to request.headers["referer"] as defined by a Request Headers fixer. The rest of the codebase is awesome! 💥

Image

Cheers 🍻 from 🇨‍🇿

SukiCZ added a commit to SukiCZ/formula that referenced this issue Mar 4, 2025
@SukiCZ SukiCZ linked a pull request Mar 4, 2025 that will close this issue
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 a pull request may close this issue.

1 participant