Skip to content

Collaborate with django-codemod #12

@jayvdb

Description

@jayvdb

https://github.com/browniebroke/django-codemod does code rewriting , and many of their fixers are in the format

class URLTransformer(BaseSimpleFuncRenameTransformer):
    """Resolve deprecation of ``django.conf.urls.url``."""

    deprecated_in = DJANGO_30
    removed_in = DJANGO_40
    rename_from = "django.conf.urls.url"
    rename_to = "django.urls.re_path"

That structure is more re-usable metadata-ish, but they have far fewer fixers, so it would take a big effort to move all of the fixes here to there.

What would be more feasible is if this project used a more metadata-ish format for the 'easy' cases, ideally even a yaml file, and then django-codemod could load those from this project, and do their own thing for the entries which they can correctly parse/handle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions