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

Smarter file patching #2

Open
ipmb opened this issue Oct 21, 2022 · 0 comments
Open

Smarter file patching #2

ipmb opened this issue Oct 21, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@ipmb
Copy link
Member

ipmb commented Oct 21, 2022

Potential problems with the current approach:

  • middleware/apps will get added twice if they already exist pre-patch
  • imports may be duplicated and get added somewhere other than the top of the file where they should be

Doing it with AST like how django-upgrade works will probably be more robust.

@ipmb ipmb added the help wanted Extra attention is needed label Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant