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.
Potential problems with the current approach:
Doing it with AST like how
django-upgradeworks will probably be more robust.