Skip to content

Add pre-commit hook for django-upgrade #26

Open
@SukiCZ

Description

@SukiCZ

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 🇨‍🇿

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions